-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
175 lines (157 loc) · 7.47 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Current Source Programmer</title>
<!-- Include Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<!-- Include Plotly library -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<style>
.terminal {
background-color: #2b2b2b;
color: #dcdccc;
padding: 10px;
margin-top: 20px;
font-family: 'Courier New', monospace;
white-space: pre-wrap;
overflow-y: auto;
max-height: 200px; /* Adjust as needed */
/* ... (existing styling) ... */
overflow-y: auto;
max-height: 200px;
position: relative;
}
.cursor {
display: inline-block;
width: 10px;
height: 16px;
background-color: #dcdccc;
animation: blink 1s infinite step-start;
}
@keyframes blink {
50% {
opacity: 0;
}
}
</style>
</head>
<body>
<div class="container mt-5">
<div class="row">
<div class="col-md-8">
<!-- Title Element -->
<h2>Current Source Programmer</h2>
<!-- Frequency Textbox -->
<div class="form-group">
<label for="frequency">Frequency (Hz)</label>
<input type="text" class="form-control" id="frequency" placeholder="Enter frequency ">
</div>
<label for="waitUntil">Wait Until Enable / Disable (High Freq Disable)</label>
<select id="waitUntil" class="form-control">
<option selected>Choose...</option>
<option>Enabled</option>
<option>Disabled</option>
</select>
<label for="zeroThreshold">Zero Threshold: Smaller more likely to alias at higher frequencies </label>
<div class="form-group col-md-4">
<input type="text" class="form-control" id="zeroThreshold" value="500">
</div>
<!-- First Dropdown Menu and Text Fields -->
<div class="form-row">
<div class="form-group col-md-4">
<label for="polarity1">Polarity</label>
<select id="polarity1" class="form-control">
<option selected>Choose...</option>
<option>Positive</option>
<option>Negative</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="delayStart1">Delay Start (ms)</label>
<input type="text" class="form-control" id="delayStart1" placeholder="Enter delay start">
</div>
<div class="form-group col-md-4">
<label for="currentDuration1">Current Duration (ms)</label>
<input type="text" class="form-control" id="currentDuration1" placeholder="Enter current duration">
</div>
</div>
<!-- Duplicate Dropdown Menu and Text Fields -->
<div class="form-row">
<div class="form-group col-md-4">
<label for="polarity2">Polarity</label>
<select id="polarity2" class="form-control">
<option selected>Choose...</option>
<option>Positive</option>
<option>Negative</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="delayStart2">Delay Start (ms)</label>
<input type="text" class="form-control" id="delayStart2" placeholder="Enter delay start">
</div>
<div class="form-group col-md-4">
<label for="currentDuration2">Current Duration (ms)</label>
<input type="text" class="form-control" id="currentDuration2" placeholder="Enter current duration">
</div>
</div>
<!-- Duplicate Dropdown Menu and Text Fields -->
<div class="form-row">
<div class="form-group col-md-4">
<label for="polarity3">Polarity</label>
<select id="polarity3" class="form-control">
<option selected>Choose...</option>
<option>Positive</option>
<option>Negative</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="delayStart3">Delay Start (ms)</label>
<input type="text" class="form-control" id="delayStart3" placeholder="Enter delay start">
</div>
<div class="form-group col-md-4">
<label for="currentDuration3">Current Duration (ms)</label>
<input type="text" class="form-control" id="currentDuration3" placeholder="Enter current duration">
</div>
</div>
<!-- Duplicate Dropdown Menu and Text Fields -->
<div class="form-row">
<div class="form-group col-md-4">
<label for="polarity4">Polarity</label>
<select id="polarity4" class="form-control">
<option selected>Choose...</option>
<option>Positive</option>
<option>Negative</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="delayStart4">Delay Start (ms)</label>
<input type="text" class="form-control" id="delayStart4" placeholder="Enter delay start">
</div>
<div class="form-group col-md-4">
<label for="currentDuration4">Current Duration (ms)</label>
<input type="text" class="form-control" id="currentDuration4" placeholder="Enter current duration">
</div>
</div>
<!-- Buttons -->
<!-- Add this button inside the <div class="col-md-8"> element -->
<button type="button" class="btn btn-warning" onclick="connectToArduino()">Connect to Arduino</button>
<button type="button" class="btn btn-primary" onclick="analyze()">Analyze</button>
<button type="button" class="btn btn-success" onclick="analyzeArduino()">Program</button>
<h2>Serial Communications</h2>
<div id="receivedData" class="terminal"><!-- Add the cursor class to the receivedData div -->
<div id="receivedData" class="terminal cursor"></div>
</div>
<!-- Scatter Plot Container -->
<div id="scatterPlot"></div>
</div>
</div>
</div>
<!-- Include Bootstrap JS and Popper.js -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="index.js"></script>
</body>
</html>