-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreading.py
430 lines (405 loc) · 30.5 KB
/
reading.py
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
import serial as s1
import numpy as np
from tkinter import *
testingArray = [
['0.0', '0.68', '0.45', '0.53', '0.06', '-1.56', '1.29', '0.91', '1.62', '0.11', '-0.31', '0.28'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.00', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.00', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.00', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.62', '1.32', '1.53', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.62', '1.33', '1.53', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.62', '1.33', '1.53', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.01', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.02', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.02', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.02', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.02', '0.00'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.02', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.02', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.02', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.62', '1.32', '1.53', '-0.00', '-0.03', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.62', '1.32', '1.53', '-0.00', '-0.04', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.04', '0.01'],
['0', '0.41', '0.36', '0.00', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.32', '1.54', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.04', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.32', '1.53', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.05', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.53', '-0.00', '-0.06', '0.01'],
['0', '0.38', '0.36', '-0.03', '0.00', '0.00', '1.63', '1.33', '1.54', '-0.00', '-0.06', '0.02'],
['0', '0.58', '0.32', '0.22', '-0.06', '-0.14', '1.64', '1.33', '1.54', '-0.03', '-0.03', '0.06'],
['0', '0.94', '0.41', '0.69', '0.06', '-0.39', '1.65', '1.31', '1.53', '-0.09', '0.02', '0.15'],
['0', '0.89', '0.52', '0.62', '0.21', '-0.39', '1.67', '1.29', '1.53', '-0.10', '0.12', '0.16'],
['0', '1.18', '0.71', '1.02', '0.46', '-0.55', '1.66', '1.27', '1.52', '-0.11', '0.24', '0.21'],
['0', '1.09', '0.77', '0.89', '0.55', '-0.61', '1.66', '1.25', '1.51', '-0.11', '0.36', '0.23'],
['0', '0.98', '0.80', '0.76', '0.60', '-0.76', '1.64', '1.20', '1.48', '-0.13', '0.50', '0.25'],
['0', '1.27', '0.47', '1.15', '0.20', '-1.26', '1.63', '1.11', '1.44', '-0.20', '0.58', '0.29'],
['0', '1.36', '0.64', '1.28', '0.44', '-0.95', '1.62', '0.96', '1.39', '-0.30', '0.61', '0.24'],
['0', '1.55', '0.68', '1.57', '0.53', '-0.56', '1.50', '0.89', '1.29', '-0.36', '0.68', '0.21'],
['0', '1.54', '0.60', '1.57', '0.48', '-0.56', '1.43', '0.93', '1.16', '-0.42', '0.68', '0.22'],
['0', '1.63', '0.25', '1.69', '0.10', '-1.20', '1.42', '1.07', '1.03', '-0.50', '0.66', '0.28'],
['0', '2.19', '-0.20', '2.40', '-0.42', '-0.83', '1.45', '1.20', '1.01', '-0.55', '0.72', '0.37'],
['0', '2.19', '-0.43', '2.40', '-0.69', '-1.03', '1.49', '1.30', '1.00', '-0.61', '0.66', '0.37'],
['0', '3.31', '0.02', '3.85', '-0.15', '-1.36', '1.50', '1.54', '0.96', '-0.65', '0.59', '0.27'],
['0', '4.16', '-0.24', '4.98', '-0.49', '-1.41', '1.55', '1.61', '1.06', '-0.66', '0.63', '0.35'],
['0', '4.15', '-0.19', '4.98', '-0.49', '-1.41', '1.59', '1.58', '1.18', '-0.66', '0.65', '0.42'],
['0', '4.21', '-0.11', '5.07', '-0.43', '-1.41', '1.62', '1.56', '1.24', '-0.65', '0.66', '0.51'],
['0', '4.30', '-0.09', '5.20', '-0.43', '-1.41', '1.64', '1.52', '1.28', '-0.64', '0.72', '0.60'],
['0', '4.27', '-0.13', '5.16', '-0.49', '-1.19', '1.65', '1.51', '1.30', '-0.62', '0.74', '0.65'],
['0', '4.27', '-0.13', '5.16', '-0.49', '-1.25', '1.66', '1.49', '1.31', '-0.64', '0.73', '0.74'],
['0', '4.27', '-0.13', '5.16', '-0.49', '-1.31', '1.66', '1.46', '1.31', '-0.66', '0.74', '0.81'],
['0', '4.27', '-0.13', '5.16', '-0.49', '-1.31', '1.66', '1.43', '1.31', '-0.66', '0.75', '0.88'],
['0', '4.27', '-0.13', '5.16', '-0.49', '-1.31', '1.67', '1.39', '1.31', '-0.66', '0.81', '0.96'],
['0', '4.27', '-0.14', '5.16', '-0.49', '-1.21', '1.67', '1.32', '1.29', '-0.65', '0.81', '1.00'],
['0', '4.30', '-0.15', '5.20', '-0.49', '-1.07', '1.66', '1.30', '1.26', '-0.64', '0.83', '0.97'],
['0', '4.34', '-0.20', '5.26', '-0.54', '-1.21', '1.66', '1.27', '1.22', '-0.65', '0.80', '0.98'],
['0', '4.30', '-0.32', '5.20', '-0.66', '-1.56', '1.65', '1.23', '1.20', '-0.67', '0.76', '0.98'],
['0', '4.30', '-0.31', '5.20', '-0.66', '-1.56', '1.64', '1.20', '1.21', '-0.67', '0.78', '1.03'],
['0', '3.99', '-0.29', '4.79', '-0.66', '-1.56', '1.65', '1.13', '1.26', '-0.67', '0.83', '1.07'],
['0', '3.97', '-0.32', '4.75', '-0.71', '-1.42', '1.65', '1.11', '1.29', '-0.66', '0.86', '1.09'],
['0', '3.88', '-0.30', '4.64', '-0.71', '-1.42', '1.66', '1.08', '1.32', '-0.66', '0.88', '1.13'],
['0', '3.88', '-0.29', '4.64', '-0.71', '-1.54', '1.66', '1.04', '1.34', '-0.67', '0.90', '1.14'],
['0', '3.88', '-0.28', '4.64', '-0.71', '-1.61', '1.65', '1.00', '1.36', '-0.67', '0.91', '1.16'],
['0', '3.65', '-0.44', '4.33', '-0.93', '-1.48', '1.65', '0.96', '1.38', '-0.65', '0.96', '1.20'],
['0', '3.65', '-0.46', '4.33', '-0.97', '-1.28', '1.66', '0.93', '1.40', '-0.64', '0.96', '1.22'],
['0', '3.65', '-0.55', '4.33', '-1.08', '-0.93', '1.66', '0.93', '1.40', '-0.62', '0.96', '1.22'],
['0', '3.65', '-0.67', '4.33', '-1.24', '-0.54', '1.66', '0.93', '1.40', '-0.60', '0.93', '1.22'],
['0', '3.88', '-1.17', '4.65', '-1.85', '-0.01', '1.67', '0.95', '1.38', '-0.55', '0.88', '1.20'],
['0', '4.26', '-1.37', '5.16', '-2.10', '-0.20', '1.67', '0.98', '1.37', '-0.57', '0.80', '1.16'],
['0', '4.55', '-1.81', '5.53', '-2.64', '-0.55', '1.64', '0.99', '1.35', '-0.65', '0.75', '1.13'],
['0', '4.56', '-2.48', '5.53', '-3.47', '-0.86', '1.61', '0.99', '1.34', '-0.73', '0.74', '1.11'],
['0', '4.58', '-3.07', '5.53', '-4.19', '-1.18', '1.57', '1.01', '1.32', '-0.80', '0.73', '1.08'],
['0', '4.59', '-3.68', '5.53', '-4.95', '-1.55', '1.54', '1.03', '1.32', '-0.86', '0.74', '1.06'],
['0', '4.62', '-4.11', '5.57', '-5.48', '-2.06', '1.51', '1.04', '1.31', '-0.91', '0.74', '1.05'],
['0', '4.78', '-4.19', '5.76', '-5.56', '-2.29', '1.49', '1.05', '1.30', '-0.93', '0.77', '1.03'],
['0', '4.89', '-4.26', '5.90', '-5.64', '-2.09', '1.49', '1.07', '1.29', '-0.91', '0.82', '1.03'],
['0', '4.84', '-4.45', '5.84', '-5.88', '-1.82', '1.51', '1.05', '1.29', '-0.90', '0.86', '1.05'],
['0', '4.83', '-4.69', '5.84', '-6.20', '-1.50', '1.53', '1.03', '1.30', '-0.87', '0.89', '1.08'],
['0', '4.82', '-4.87', '5.84', '-6.44', '-1.07', '1.55', '1.01', '1.32', '-0.84', '0.89', '1.12'],
['0', '4.81', '-5.09', '5.84', '-6.74', '-0.83', '1.58', '1.00', '1.33', '-0.79', '0.89', '1.17'],
['0', '4.69', '-5.13', '5.71', '-6.80', '-0.28', '1.62', '0.98', '1.33', '-0.75', '0.86', '1.21'],
['0', '4.65', '-5.21', '5.67', '-6.88', '0.23', '1.64', '0.99', '1.33', '-0.72', '0.83', '1.23'],
['0', '4.65', '-5.20', '5.67', '-6.88', '0.28', '1.66', '0.97', '1.33', '-0.71', '0.82', '1.26'],
['0', '4.64', '-5.18', '5.67', '-6.88', '0.28', '1.66', '0.96', '1.35', '-0.71', '0.81', '1.28'],
['0', '4.65', '-5.17', '5.67', '-6.88', '0.09', '1.66', '0.95', '1.35', '-0.72', '0.82', '1.29'],
['0', '4.65', '-5.28', '5.67', '-7.04', '-0.35', '1.64', '0.93', '1.36', '-0.75', '0.83', '1.29'],
['0', '4.66', '-5.27', '5.67', '-7.04', '-0.52', '1.63', '0.91', '1.37', '-0.75', '0.86', '1.29'],
['0', '4.69', '-5.38', '5.71', '-7.18', '-0.81', '1.62', '0.89', '1.37', '-0.77', '0.88', '1.28'],
['0', '4.73', '-5.45', '5.75', '-7.26', '-1.08', '1.60', '0.87', '1.37', '-0.79', '0.90', '1.27'],
['0', '4.73', '-5.49', '5.75', '-7.32', '-1.30', '1.59', '0.85', '1.37', '-0.80', '0.91', '1.26'],
['0', '4.74', '-5.59', '5.75', '-7.45', '-1.63', '1.58', '0.83', '1.37', '-0.82', '0.92', '1.25'],
['0', '4.74', '-5.68', '5.75', '-7.58', '-1.97', '1.57', '0.82', '1.38', '-0.84', '0.93', '1.24'],
['0', '4.75', '-5.77', '5.75', '-7.68', '-2.24', '1.56', '0.83', '1.37', '-0.85', '0.93', '1.21'],
['0', '4.76', '-5.80', '5.75', '-7.68', '-2.41', '1.53', '0.87', '1.35', '-0.88', '0.92', '1.15'],
['0', '4.77', '-5.76', '5.75', '-7.58', '-2.59', '1.50', '0.92', '1.33', '-0.93', '0.91', '1.09'],
['0', '4.79', '-5.94', '5.75', '-7.81', '-2.84', '1.46', '0.98', '1.33', '-0.96', '0.91', '1.06'],
['0', '4.79', '-6.04', '5.75', '-7.92', '-3.12', '1.44', '1.00', '1.32', '-0.99', '0.91', '1.04'],
['0', '4.86', '-6.04', '5.83', '-7.92', '-3.01', '1.44', '1.01', '1.33', '-0.98', '0.92', '1.04'],
['0', '4.88', '-6.12', '5.87', '-8.00', '-2.74', '1.45', '1.02', '1.31', '-0.96', '0.93', '1.03'],
['0', '4.88', '-6.20', '5.87', '-8.07', '-2.50', '1.45', '1.03', '1.30', '-0.95', '0.93', '1.02'],
['0', '4.88', '-6.40', '5.87', '-8.25', '-2.23', '1.46', '1.07', '1.27', '-0.92', '0.92', '1.00'],
['0', '4.87', '-6.56', '5.87', '-8.39', '-2.14', '1.47', '1.12', '1.24', '-0.90', '0.91', '0.96'],
['0', '4.87', '-6.58', '5.87', '-8.39', '-2.05', '1.48', '1.17', '1.22', '-0.89', '0.91', '0.93'],
['0', '4.87', '-6.61', '5.87', '-8.39', '-1.96', '1.48', '1.21', '1.21', '-0.88', '0.91', '0.91'],
['0', '4.92', '-6.69', '5.94', '-8.48', '-1.66', '1.49', '1.24', '1.20', '-0.86', '0.93', '0.89'],
['0', '4.91', '-6.81', '5.94', '-8.60', '-1.37', '1.51', '1.26', '1.19', '-0.84', '0.93', '0.88'],
['0', '4.90', '-6.91', '5.94', '-8.70', '-1.13', '1.52', '1.28', '1.18', '-0.82', '0.92', '0.87'],
['0', '4.90', '-7.03', '5.94', '-8.83', '-0.89', '1.54', '1.31', '1.17', '-0.79', '0.91', '0.85'],
['0', '5.03', '-7.11', '6.11', '-8.88', '-0.50', '1.55', '1.35', '1.15', '-0.75', '0.95', '0.83'],
['0', '5.14', '-7.26', '6.27', '-8.96', '-0.07', '1.56', '1.38', '1.10', '-0.71', '0.99', '0.81'],
['0', '5.11', '-7.42', '6.23', '-9.09', '0.25', '1.57', '1.39', '1.07', '-0.68', '1.02', '0.81'],
['0', '5.01', '-7.68', '6.12', '-9.37', '0.69', '1.58', '1.38', '1.06', '-0.65', '1.05', '0.83'],
['0', '5.01', '-7.61', '6.12', '-9.37', '0.80', '1.60', '1.35', '1.10', '-0.64', '1.04', '0.86'],
['0', '4.96', '-7.55', '6.06', '-9.37', '0.92', '1.62', '1.32', '1.13', '-0.64', '1.01', '0.89'],
['0', '4.95', '-7.71', '6.06', '-9.53', '1.33', '1.63', '1.32', '1.11', '-0.61', '1.00', '0.91'],
['0', '4.91', '-8.05', '6.01', '-9.91', '1.79', '1.65', '1.32', '1.10', '-0.58', '1.02', '0.94'],
['0', '4.86', '-8.16', '5.97', '-10.04', '2.03', '1.68', '1.31', '1.09', '-0.55', '1.03', '1.00'],
['0', '4.85', '-8.14', '5.97', '-10.04', '2.14', '1.70', '1.28', '1.11', '-0.54', '1.02', '1.05'],
['0', '4.84', '-8.08', '5.97', '-10.04', '2.02', '1.71', '1.25', '1.14', '-0.55', '1.02', '1.09'],
['0', '4.77', '-8.14', '5.86', '-10.19', '1.58', '1.71', '1.21', '1.17', '-0.58', '1.04', '1.13'],
['0', '4.73', '-8.44', '5.80', '-10.64', '0.95', '1.70', '1.17', '1.21', '-0.63', '1.06', '1.15'],
['0', '4.70', '-8.64', '5.75', '-11.01', '0.33', '1.69', '1.12', '1.26', '-0.68', '1.08', '1.17'],
['0', '4.73', '-8.91', '5.75', '-11.42', '-0.27', '1.61', '1.08', '1.28', '-0.72', '1.09', '1.18'],
['0', '4.70', '-8.99', '5.75', '-11.57', '-0.71', '1.67', '1.06', '1.30', '-0.74', '1.11', '1.19'],
['0', '4.71', '-8.98', '5.75', '-11.57', '-0.90', '1.66', '1.04', '1.31', '-0.75', '1.12', '1.19'],
['0', '4.71', '-8.97', '5.75', '-11.57', '-0.90', '1.66', '1.02', '1.31', '-0.75', '1.13', '1.19'],
['0', '4.71', '-8.97', '5.75', '-11.57', '-0.99', '1.65', '1.01', '1.31', '-0.76', '1.13', '1.19'],
['0', '4.71', '-9.01', '5.75', '-11.60', '-1.18', '1.64', '1.00', '1.30', '-0.77', '1.13', '1.19'],
['0', '4.72', '-9.01', '5.75', '-11.60', '-1.31', '1.64', '0.99', '1.30', '-0.77', '1.13', '1.19'],
['0', '4.72', '-9.02', '5.75', '-11.60', '-1.47', '1.64', '0.99', '1.30', '-0.78', '1.12', '1.18'],
['0', '4.72', '-9.02', '5.75', '-11.60', '-1.55', '1.63', '1.00', '1.30', '-0.78', '1.12', '1.17'],
['0', '4.72', '-9.05', '5.75', '-11.60', '-1.51', '1.63', '1.00', '1.28', '-0.78', '1.12', '1.16'],
['0', '4.72', '-9.06', '5.75', '-11.60', '-1.45', '1.63', '1.01', '1.28', '-0.78', '1.11', '1.16'],
['0', '4.72', '-9.08', '5.75', '-11.60', '-1.41', '1.62', '1.01', '1.27', '-0.78', '1.11', '1.15'],
['0', '4.72', '-9.08', '5.75', '-11.60', '-1.41', '1.62', '1.02', '1.27', '-0.78', '1.10', '1.15'],
['0', '4.72', '-9.09', '5.75', '-11.60', '-1.47', '1.62', '1.03', '1.27', '-0.78', '1.10', '1.15'],
['0', '4.72', '-9.09', '5.75', '-11.60', '-1.54', '1.62', '1.02', '1.27', '-0.78', '1.10', '1.15'],
['0', '4.72', '-9.07', '5.75', '-11.60', '-1.54', '1.62', '1.02', '1.28', '-0.79', '1.10', '1.15'],
['0', '4.72', '-9.08', '5.75', '-11.60', '-1.54', '1.62', '1.02', '1.27', '-0.79', '1.10', '1.15'],
['0', '4.72', '-9.08', '5.75', '-11.60', '-1.54', '1.62', '1.02', '1.27', '-0.79', '1.09', '1.15'],
['0', '4.72', '-9.07', '5.75', '-11.60', '-1.60', '1.62', '1.01', '1.28', '-0.79', '1.09', '1.15'],
['0', '4.72', '-9.07', '5.75', '-11.60', '-1.64', '1.62', '1.01', '1.28', '-0.79', '1.09', '1.15'],
['0', '4.73', '-9.07', '5.75', '-11.60', '-1.77', '1.61', '1.01', '1.28', '-0.80', '1.08', '1.15'],
['0', '4.73', '-9.07', '5.75', '-11.60', '-1.85', '1.61', '1.01', '1.28', '-0.80', '1.08', '1.14'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-1.91', '1.61', '1.02', '1.27', '-0.81', '1.08', '1.14'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-1.91', '1.60', '1.02', '1.27', '-0.81', '1.07', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.00', '1.60', '1.02', '1.26', '-0.81', '1.07', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.05', '1.60', '1.02', '1.27', '-0.82', '1.07', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.11', '1.60', '1.02', '1.27', '-0.82', '1.07', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.60', '1.02', '1.27', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.06', '5.75', '-11.60', '-2.20', '1.60', '1.02', '1.28', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.60', '1.02', '1.27', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.82', '1.06', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.82', '1.05', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.82', '1.05', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.82', '1.05', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.82', '1.05', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.59', '1.03', '1.27', '-0.82', '1.05', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.60', '1.03', '1.27', '-0.83', '1.05', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.26', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.20', '1.60', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.26', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.08', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.04', '1.13'],
['0', '4.73', '-9.09', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.03', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.20', '1.59', '1.02', '1.27', '-0.83', '1.03', '1.13'],
['0', '4.73', '-9.10', '5.75', '-11.60', '-2.14', '1.59', '1.03', '1.26', '-0.83', '1.03', '1.12'],
['0', '4.74', '-9.14', '5.75', '-11.60', '-2.14', '1.58', '1.05', '1.24', '-0.83', '1.01', '1.08'],
['0', '4.78', '-9.18', '5.80', '-11.60', '-2.14', '1.57', '1.09', '1.23', '-0.83', '1.02', '1.04'],
['0', '4.99', '-9.13', '6.07', '-11.44', '-1.96', '1.55', '1.14', '1.19', '-0.81', '1.05', '1.00'],
['0', '5.10', '-9.20', '6.21', '-11.44', '-1.66', '1.55', '1.17', '1.16', '-0.78', '1.09', '0.98'],
['0', '5.04', '-9.49', '6.13', '-11.72', '-1.24', '1.55', '1.17', '1.13', '-0.76', '1.12', '1.00'],
['0', '5.03', '-9.54', '6.13', '-11.77', '-1.03', '1.56', '1.13', '1.13', '-0.74', '1.12', '1.05'],
['0', '5.02', '-9.53', '6.13', '-11.81', '-0.90', '1.59', '1.08', '1.14', '-0.73', '1.12', '1.11'],
['0', '4.95', '-9.39', '6.05', '-11.81', '-0.99', '1.61', '1.03', '1.21', '-0.74', '1.15', '1.18'],
['0', '4.95', '-9.29', '6.05', '-11.84', '-1.17', '1.61', '0.97', '1.27', '-0.78', '1.16', '1.24'],
['0', '4.95', '-9.27', '6.05', '-11.95', '-1.45', '1.60', '0.91', '1.31', '-0.82', '1.16', '1.29'],
['0', '4.97', '-9.41', '6.05', '-12.26', '-1.62', '1.57', '0.83', '1.36', '-0.87', '1.16', '1.34'],
['0', '4.95', '-9.67', '6.01', '-12.71', '-1.83', '1.54', '0.77', '1.40', '-0.92', '1.15', '1.38'],
['0', '4.93', '-9.90', '5.96', '-13.17', '-2.03', '1.51', '0.74', '1.45', '-0.97', '1.14', '1.41'],
['0', '4.94', '-9.86', '5.96', '-13.29', '-2.20', '1.48', '0.72', '1.50', '-1.01', '1.14', '1.45'],
['0', '4.96', '-9.98', '5.96', '-13.52', '-2.65', '1.44', '0.67', '1.53', '-1.04', '1.14', '1.46'],
['0', '4.98', '-9.96', '5.96', '-13.52', '-2.70', '1.41', '0.66', '1.54', '-1.04', '1.14', '1.44'],
['0', '4.98', '-10.05', '5.96', '-13.60', '-2.43', '1.40', '0.66', '1.52', '-1.02', '1.14', '1.41'],
['0', '4.98', '-10.26', '5.96', '-13.83', '-1.97', '1.40', '0.64', '1.51', '-0.99', '1.14', '1.40'],
['0', '4.98', '-10.45', '5.96', '-14.08', '-1.50', '1.40', '0.61', '1.52', '-0.96', '1.14', '1.38'],
['0', '4.98', '-10.70', '5.96', '-14.35', '-1.15', '1.39', '0.59', '1.50', '-0.93', '1.14', '1.34'],
['0', '4.98', '-11.00', '5.96', '-14.59', '-0.76', '1.39', '0.60', '1.45', '-0.88', '1.15', '1.30'],
['0', '4.98', '-11.23', '5.96', '-14.71', '-0.41', '1.40', '0.62', '1.40', '-0.85', '1.16', '1.26'],
['0', '4.98', '-11.37', '5.96', '-14.71', '-0.22', '1.41', '0.69', '1.35', '-0.82', '1.16', '1.20'],
['0', '4.98', '-11.61', '5.96', '-14.77', '-0.17', '1.41', '0.79', '1.28', '-0.81', '1.16', '1.15'],
['0', '4.97', '-11.75', '5.96', '-14.77', '-0.17', '1.41', '0.87', '1.23', '-0.81', '1.15', '1.10'],
['0', '5.06', '-11.77', '6.06', '-14.64', '-0.32', '1.39', '0.96', '1.18', '-0.83', '1.13', '1.05'],
['0', '5.06', '-11.83', '6.06', '-14.61', '-0.42', '1.39', '1.06', '1.15', '-0.85', '1.12', '1.01'],
['0', '5.06', '-11.97', '6.06', '-14.71', '-0.66', '1.39', '1.14', '1.12', '-0.87', '1.12', '0.99'],
['0', '5.06', '-12.08', '6.06', '-14.83', '-0.90', '1.39', '1.21', '1.12', '-0.89', '1.13', '0.97'],
['0', '5.05', '-12.15', '6.06', '-14.94', '-1.21', '1.40', '1.26', '1.13', '-0.91', '1.13', '0.97'],
['0', '5.05', '-12.11', '6.06', '-14.94', '-1.38', '1.41', '1.30', '1.15', '-0.92', '1.13', '0.98'],
['0', '5.04', '-12.09', '6.06', '-15.01', '-1.20', '1.43', '1.30', '1.17', '-0.91', '1.15', '1.01'],
['0', '5.03', '-12.15', '6.06', '-15.15', '-0.98', '1.44', '1.28', '1.19', '-0.89', '1.17', '1.05'],
['0', '5.03', '-12.16', '6.06', '-15.23', '-0.81', '1.45', '1.24', '1.22', '-0.87', '1.18', '1.10'],
['0', '5.02', '-12.19', '6.06', '-15.29', '-0.58', '1.46', '1.22', '1.22', '-0.86', '1.18', '1.13'],
['0', '5.02', '-12.18', '6.06', '-15.32', '-0.39', '1.48', '1.20', '1.23', '-0.85', '1.18', '1.16'],
['0', '5.01', '-12.11', '6.06', '-15.32', '-0.24', '1.49', '1.18', '1.26', '-0.84', '1.17', '1.19'],
['0', '4.98', '-12.08', '6.03', '-15.32', '-0.08', '1.51', '1.15', '1.27', '-0.83', '1.16', '1.22'],
['0', '4.95', '-12.13', '6.00', '-15.42', '0.32', '1.52', '1.13', '1.28', '-0.80', '1.15', '1.24'],
['0', '4.94', '-12.38', '6.00', '-15.73', '0.78', '1.54', '1.11', '1.28', '-0.77', '1.15', '1.27'],
['0', '4.94', '-12.51', '6.00', '-15.91', '1.16', '1.55', '1.08', '1.29', '-0.74', '1.15', '1.30'],
['0', '4.93', '-12.65', '6.00', '-16.13', '1.55', '1.56', '1.05', '1.30', '-0.71', '1.15', '1.32'],
['0', '4.92', '-12.81', '6.00', '-16.36', '2.04', '1.58', '1.04', '1.31', '-0.68', '1.14', '1.33'],
['0', '4.92', '-12.97', '6.00', '-16.58', '2.48', '1.59', '1.04', '1.31', '-0.65', '1.13', '1.34'],
['0', '4.95', '-13.01', '6.04', '-16.62', '2.65', '1.59', '1.04', '1.31', '-0.64', '1.12', '1.32'],
['0', '5.06', '-13.13', '6.18', '-16.62', '2.65', '1.59', '1.04', '1.27', '-0.64', '1.10', '1.27'],
['0', '5.17', '-13.31', '6.33', '-16.62', '2.65', '1.59', '1.10', '1.21', '-0.65', '1.07', '1.20'],
['0', '5.30', '-13.36', '6.51', '-16.53', '2.59', '1.60', '1.16', '1.16', '-0.66', '1.05', '1.14'],
['0', '5.53', '-13.27', '6.82', '-16.24', '2.43', '1.60', '1.21', '1.11', '-0.69', '1.01', '1.07'],
['0', '5.53', '-13.36', '6.82', '-16.24', '2.43', '1.60', '1.25', '1.08', '-0.70', '1.01', '1.03'],
['0', '5.53', '-13.53', '6.82', '-16.33', '2.43', '1.60', '1.29', '1.05', '-0.71', '1.02', '0.99'],
['0', '5.54', '-13.75', '6.82', '-16.69', '2.16', '1.59', '1.30', '1.08', '-0.76', '1.03', '0.98'],
['0', '5.55', '-14.24', '6.82', '-17.48', '1.62', '1.56', '1.33', '1.13', '-0.82', '1.04', '0.99'],
['0', '5.57', '-14.32', '6.82', '-17.86', '1.04', '1.54', '1.32', '1.21', '-0.86', '1.06', '1.02'],
['0', '5.57', '-14.41', '6.82', '-18.25', '0.62', '1.53', '1.32', '1.28', '-0.92', '1.08', '1.06'],
['0', '5.58', '-14.64', '6.82', '-18.74', '0.28', '1.52', '1.31', '1.33', '-0.98', '1.08', '1.11'],
['0', '5.58', '-14.98', '6.82', '-19.29', '-0.01', '1.51', '1.31', '1.36', '-1.04', '1.08', '1.15'],
['0', '5.59', '-15.06', '6.82', '-19.50', '-0.34', '1.50', '1.31', '1.38', '-1.08', '1.08', '1.20'],
['0', '5.59', '-15.01', '6.82', '-19.50', '-0.46', '1.49', '1.30', '1.40', '-1.09', '1.08', '1.25'],
['0', '5.59', '-14.97', '6.82', '-19.50', '-0.34', '1.50', '1.28', '1.41', '-1.07', '1.08', '1.31'],
['0', '5.49', '-15.07', '6.69', '-19.70', '0.20', '1.51', '1.26', '1.42', '-1.03', '1.06', '1.33'],
['0', '5.44', '-15.63', '6.65', '-20.43', '0.72', '1.54', '1.26', '1.43', '-0.97', '1.05', '1.34'],
['0', '5.43', '-16.22', '6.65', '-21.16', '1.16', '1.56', '1.27', '1.42', '-0.92', '1.02', '1.33'],
['0', '5.48', '-16.52', '6.74', '-21.42', '1.22', '1.59', '1.29', '1.40', '-0.87', '0.98', '1.26'],
['0', '5.46', '-16.61', '6.74', '-21.42', '1.22', '1.62', '1.34', '1.37', '-0.82', '0.97', '1.16'],
['0', '5.57', '-16.78', '6.91', '-21.53', '1.17', '1.65', '1.39', '1.35', '-0.79', '0.93', '1.06'],
['0', '5.76', '-16.91', '7.18', '-21.62', '1.17', '1.67', '1.42', '1.33', '-0.78', '0.90', '0.99'],
['0', '5.99', '-16.87', '7.48', '-21.55', '0.95', '1.68', '1.44', '1.33', '-0.80', '0.86', '0.96'],
['0', '6.12', '-16.89', '7.65', '-21.55', '0.50', '1.66', '1.44', '1.32', '-0.84', '0.82', '0.93'],
['0', '6.36', '-16.69', '7.96', '-21.25', '0.19', '1.65', '1.45', '1.31', '-0.87', '0.77', '0.89'],
['0', '0.41', '-16.61', '0.00', '-21.00', '0.06', '1.62', '1.46', '1.28', '-0.89', '0.73', '0.84'],
['0', '0.89', '-16.07', '0.68', '-20.17', '-0.50', '1.57', '1.47', '1.24', '-0.94', '0.67', '0.78'],
['0', '0.94', '-15.96', '0.77', '-20.09', '-0.50', '1.51', '1.42', '1.26', '-0.94', '0.62', '0.74'],
['0', '1.27', '-15.46', '1.22', '-19.59', '-0.68', '1.44', '1.34', '1.29', '-0.98', '0.56', '0.69'],
['0', '1.29', '-14.88', '1.26', '-19.20', '-0.80', '1.39', '1.22', '1.36', '-1.01', '0.52', '0.65'],
['0', '1.24', '-14.43', '1.20', '-18.95', '-0.80', '1.38', '1.09', '1.44', '-1.03', '0.50', '0.60'],
['0', '1.24', '-14.00', '1.20', '-18.68', '-0.80', '1.41', '0.89', '1.51', '-1.06', '0.45', '0.56'],
['0', '1.25', '-13.24', '1.20', '-18.02', '-1.00', '1.45', '0.63', '1.58', '-1.10', '0.40', '0.52'],
['0', '1.24', '-12.74', '1.16', '-17.53', '-1.06', '1.50', '0.33', '1.62', '-1.13', '0.35', '0.48'],
['0', '1.13', '-12.70', '0.98', '-17.53', '-1.06', '1.59', '0.28', '1.64', '-1.13', '0.32', '0.46'],
['0', '1.00', '-12.73', '0.78', '-17.53', '-1.06', '1.67', '0.38', '1.63', '-1.13', '0.28', '0.44'],
['0', '0.87', '-12.77', '0.56', '-17.53', '-1.06', '1.74', '0.34', '1.61', '-1.13', '0.25', '0.43'],
['0', '0.73', '-12.92', '0.32', '-17.57', '-1.10', '1.79', '0.21', '1.58', '-1.12', '0.22', '0.42'],
['0', '0.60', '-13.07', '0.14', '-17.61', '-1.10', '1.80', '0.16', '1.54', '-1.11', '0.19', '0.39'],
['0', '0.59', '-13.10', '0.14', '-17.55', '-1.23', '1.78', '0.32', '1.52', '-1.09', '0.19', '0.37'],
['0', '0.70', '-13.26', '0.30', '-17.55', '-1.31', '1.76', '0.51', '1.46', '-1.04', '0.21', '0.36']
]
class main:
def __init__(self,root):
self.array = testingArray
self.root = root
self.toggleVar = False
self.setUpCanvas()
self.old_x = None
self.old_y = None
self.root.bind('<space>', self.command)
def updatingCanvas(self, values, button):
#if button == 1.0:
if self.old_x and self.old_y:
self.c.create_line(self.old_x,self.old_y,values[0],values[1],capstyle=ROUND, smooth=True)
self.old_x = values[0]
self.old_y = values[1]
#The tesing one
def drawFromValues(self):
for input in self.array:
sampleArray = input
x = np.asarray(sampleArray, dtype=np.float64, order='C')
x[1] = x[1] * 100
x[2] = x[2] * 100
buttonOutput = x[0]
print(buttonOutput)
newVals = np.delete(x, 0)
self.updatingCanvas(newVals,buttonOutput)
'''
print(cord)
buttonOutput = floatArray[0]
print(floatArray.size)
print(floatArray[1])
newVal = floatArray[1] * 100
print(newVal)
newVals = np.delete(val, 0)
# ensures that all values are positive
np.absolute(newVals)
# newVals.astype(int)
self.updatingCanvas(newVals, buttonOutput)
'''
'''
def drawFromValues(self):
ser = s1.Serial('/dev/cu.usbmodem14201', 115200)
while True:
b = ser.readline()
string_n = b.decode()
string = string_n.rstrip()
cord = string.split(",")
floatArray = np.array(cord)
print(cord)
val = floatArray.astype(float)
buttonOutput = val[0]
val * 100
newVals = np.delete(val, 0)
#ensures that all values are positive
np.absolute(newVals)
#newVals.astype(int)
self.updatingCanvas(newVals, buttonOutput)
'''
def command(self,e):
self.toggleVar = not self.toggleVar
if self.toggleVar:
print("toggled")
self.drawFromValues()
def setUpCanvas(self):
self.c = Canvas(self.root)
self.c.pack()
menu = Menu(self.root)
self.root.config(menu=menu)
optionsMenu = Menu(menu)
menu.add_cascade(label='Options', menu=optionsMenu)
optionsMenu.add_command(label='Exit',command=self.root.destroy)
if __name__ == "__main__":
root = Tk()
main(root)
root.mainloop()
'''
b1 = "down"
xold, yold = None, None
canvas_W = 750
canvas_H = 600
count = 0;
def main(values,button,drawing_area):
#b1down(button)
#b1up(button)
motion(values,drawing_area)
def b1down(button):
global b1
if button == 1.0:
b1 = "down"
def b1up(button):
global b1, xold, yold
if button == 0.0:
b1 = "up"
xold = None
yold = None
def motion(values,canvas):
if b1 == "down":
global xold, yold
xold = values[0]
yold = values[1]
if xold is not None and yold is not None:
canvas.create_line(xold,yold,xold+10,yold+10,smooth=TRUE)
if __name__ == "__main__":
root = Tk()
drawing_area = Canvas(root, width=canvas_W, height=canvas_H)
drawing_area.pack()
ser = s1.Serial('/dev/cu.usbmodem14201', 115200)
while True:
b = ser.readline()
string_n = b.decode()
string = string_n.rstrip()
cord = string.split(",")
floatArray = np.array(cord)
print(cord)
#converts the string array as a float
val = floatArray.astype(float)
#gets the button output. 0.0 as button up, 1.0 as button down
buttonOutput = val[0]
#mutiplies each element by 100 to fit in the canvas
val * 100
#deletes the first element, as that served as the button
newVals = np.delete(val,0)
#convert the float array as an int array
newVals.astype(int)
#calls the method and updates it as the whole thing runs on a loop.
main(newVals,buttonOutput,drawing_area)
#print("reached")
#root.mainloop()
'''