Commit e7e678cbee00ead479145dbc88170f376fec4b53

Authored by Greg Sandstrom
1 parent 5aa9fdaf8e
Exists in main

switch from platformio to arduino vscode extension by ms, starting testing some scripts for RT clock

Showing 12 changed files with 735 additions and 146 deletions Inline Diff

.vscode/arduino.json View file @ e7e678c
File was created 1 {
2 "configuration": "opt=small,usbstack=arduino,debug=off",
3 "board": "adafruit:samd:adafruit_feather_m0",
4 "port": "/dev/tty.usbmodem1401",
5 "sketch": "dirwin.ino"
6 }
.vscode/c_cpp_properties.json View file @ e7e678c
File was created 1 {
2 "version": 4,
3 "configurations": [
4 {
5 "name": "Arduino",
6 "compilerPath": "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-g++",
7 "compilerArgs": [
8 "-mcpu=cortex-m0plus",
9 "-mthumb",
10 "-Werror=return-type",
11 "-std=gnu++11",
12 "-ffunction-sections",
13 "-fdata-sections",
14 "-fno-threadsafe-statics",
15 "-nostdlib",
16 "--param",
17 "-fno-rtti",
18 "-fno-exceptions"
19 ],
20 "intelliSenseMode": "gcc-x64",
21 "includePath": [
22 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/libraries/Adafruit_TinyUSB_Arduino/src/arduino",
23 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/libraries/Adafruit_TinyUSB_Arduino/src/arduino",
24 "/Users/greg/Library/Arduino15/packages/adafruit/tools/CMSIS/5.4.0/CMSIS/Core/Include/",
25 "/Users/greg/Library/Arduino15/packages/adafruit/tools/CMSIS/5.4.0/CMSIS/DSP/Include/",
26 "/Users/greg/Library/Arduino15/packages/adafruit/tools/CMSIS-Atmel/1.2.2/CMSIS/Device/ATMEL/",
27 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/cores/arduino",
28 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/variants/feather_m0",
29 "/Users/greg/Documents/Arduino/libraries/RTClib/src",
30 "/Users/greg/Documents/Arduino/libraries/Adafruit_BusIO",
31 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/libraries/Wire",
32 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/libraries/SPI",
33 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/libraries/Adafruit_ZeroDMA",
34 "/Users/greg/Documents/Arduino/libraries/SD/src",
35 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/arm-none-eabi/include/c++/9.2.1",
36 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/arm-none-eabi/include/c++/9.2.1/arm-none-eabi",
37 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/arm-none-eabi/include/c++/9.2.1/backward",
38 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/lib/gcc/arm-none-eabi/9.2.1/include",
39 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/lib/gcc/arm-none-eabi/9.2.1/include-fixed",
40 "/Users/greg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/arm-none-eabi/include"
41 ],
42 "forcedInclude": [
43 "/Users/greg/Library/Arduino15/packages/adafruit/hardware/samd/1.7.12/cores/arduino/Arduino.h"
44 ],
45 "cStandard": "c11",
46 "cppStandard": "c++11",
47 "defines": [
48 "__SKETCH_NAME__=\"\"\"dirwin.ino\"\"\"",
49 "F_CPU=48000000L",
50 "ARDUINO=10607",
51 "ARDUINO_SAMD_ZERO",
52 "ARDUINO_ARCH_SAMD",
53 "ARDUINO_SAMD_ADAFRUIT",
54 "__SAMD21G18A__",
55 "ADAFRUIT_FEATHER_M0",
56 "ARDUINO_SAMD_ZERO",
57 "ARM_MATH_CM0PLUS",
58 "USB_VID=0x239A",
59 "USB_PID=0x800B",
60 "USBCON",
61 "USB_CONFIG_POWER=100",
62 "USB_MANUFACTURER=\"Adafruit\"",
63 "USB_PRODUCT=\"Feather M0\"",
64 "__SAMD21G18A__",
65 "ADAFRUIT_FEATHER_M0",
66 "ARDUINO_SAMD_ZERO",
67 "ARM_MATH_CM0PLUS",
68 "USB_VID=0x239A",
69 "USB_PID=0x800B",
70 "USBCON",
71 "USB_CONFIG_POWER=100",
72 "USB_MANUFACTURER=\"Adafruit\"",
73 "USB_PRODUCT=\"Feather M0\"",
74 "__DBL_MIN_EXP__=(-1021)",
75 "__HQ_FBIT__=15",
76 "__FLT32X_MAX_EXP__=1024",
77 "__cpp_attributes=200809",
78 "__UINT_LEAST16_MAX__=0xffff",
79 "__ARM_SIZEOF_WCHAR_T=4",
80 "__ATOMIC_ACQUIRE=2",
81 "__SFRACT_IBIT__=0",
82 "__FLT_MIN__=1.1754943508222875e-38F",
83 "__GCC_IEC_559_COMPLEX=0",
84 "__cpp_aggregate_nsdmi=201304",
85 "__UFRACT_MAX__=0XFFFFP-16UR",
86 "__UINT_LEAST8_TYPE__=unsigned char",
87 "__DQ_FBIT__=63",
88 "__INTMAX_C(c)=c ## LL",
89 "__ULFRACT_FBIT__=32",
90 "__SACCUM_EPSILON__=0x1P-7HK",
91 "__CHAR_BIT__=8",
92 "__USQ_IBIT__=0",
93 "__UINT8_MAX__=0xff",
94 "__ACCUM_FBIT__=15",
95 "__WINT_MAX__=0xffffffffU",
96 "__FLT32_MIN_EXP__=(-125)",
97 "__cpp_static_assert=200410",
98 "__USFRACT_FBIT__=8",
99 "__ORDER_LITTLE_ENDIAN__=1234",
100 "__SIZE_MAX__=0xffffffffU",
101 "__ARM_ARCH_ISA_ARM=1",
102 "__WCHAR_MAX__=0xffffffffU",
103 "__LACCUM_IBIT__=32",
104 "__DBL_DENORM_MIN__=double(4.9406564584124654e-324L)",
105 "__GCC_ATOMIC_CHAR_LOCK_FREE=1",
106 "__GCC_IEC_559=0",
107 "__FLT32X_DECIMAL_DIG__=17",
108 "__FLT_EVAL_METHOD__=0",
109 "__cpp_binary_literals=201304",
110 "__LLACCUM_MAX__=0X7FFFFFFFFFFFFFFFP-31LLK",
111 "__FLT64_DECIMAL_DIG__=17",
112 "__GCC_ATOMIC_CHAR32_T_LOCK_FREE=1",
113 "__FRACT_FBIT__=15",
114 "__cpp_variadic_templates=200704",
115 "__UINT_FAST64_MAX__=0xffffffffffffffffULL",
116 "__SIG_ATOMIC_TYPE__=int",
117 "__UACCUM_FBIT__=16",
118 "__DBL_MIN_10_EXP__=(-307)",
119 "__FINITE_MATH_ONLY__=0",
120 "__ARMEL__=1",
121 "__cpp_variable_templates=201304",
122 "__LFRACT_IBIT__=0",
123 "__GNUC_PATCHLEVEL__=1",
124 "__FLT32_HAS_DENORM__=1",
125 "__LFRACT_MAX__=0X7FFFFFFFP-31LR",
126 "__UINT_FAST8_MAX__=0xffffffffU",
127 "__cpp_rvalue_reference=200610",
128 "__has_include(STR)=__has_include__(STR)",
129 "__DEC64_MAX_EXP__=385",
130 "__INT8_C(c)=c",
131 "__INT_LEAST8_WIDTH__=8",
132 "__UINT_LEAST64_MAX__=0xffffffffffffffffULL",
133 "__SA_FBIT__=15",
134 "__SHRT_MAX__=0x7fff",
135 "__LDBL_MAX__=1.7976931348623157e+308L",
136 "__FRACT_MAX__=0X7FFFP-15R",
137 "__UFRACT_FBIT__=16",
138 "__UFRACT_MIN__=0.0UR",
139 "__UINT_LEAST8_MAX__=0xff",
140 "__GCC_ATOMIC_BOOL_LOCK_FREE=1",
141 "__UINTMAX_TYPE__=long long unsigned int",
142 "__LLFRACT_EPSILON__=0x1P-63LLR",
143 "__DEC32_EPSILON__=1E-6DF",
144 "__FLT_EVAL_METHOD_TS_18661_3__=0",
145 "__CHAR_UNSIGNED__=1",
146 "__UINT32_MAX__=0xffffffffUL",
147 "__GXX_EXPERIMENTAL_CXX0X__=1",
148 "__ULFRACT_MAX__=0XFFFFFFFFP-32ULR",
149 "__TA_IBIT__=64",
150 "__LDBL_MAX_EXP__=1024",
151 "__WINT_MIN__=0U",
152 "__INT_LEAST16_WIDTH__=16",
153 "__ULLFRACT_MIN__=0.0ULLR",
154 "__SCHAR_MAX__=0x7f",
155 "__WCHAR_MIN__=0U",
156 "__INT64_C(c)=c ## LL",
157 "__DBL_DIG__=15",
158 "__GCC_ATOMIC_POINTER_LOCK_FREE=1",
159 "__LLACCUM_MIN__=(-0X1P31LLK-0X1P31LLK)",
160 "__SIZEOF_INT__=4",
161 "__SIZEOF_POINTER__=4",
162 "__GCC_ATOMIC_CHAR16_T_LOCK_FREE=1",
163 "__USACCUM_IBIT__=8",
164 "__USER_LABEL_PREFIX__",
165 "__STDC_HOSTED__=1",
166 "__LDBL_HAS_INFINITY__=1",
167 "__LFRACT_MIN__=(-0.5LR-0.5LR)",
168 "__HA_IBIT__=8",
169 "__FLT32_DIG__=6",
170 "__TQ_IBIT__=0",
171 "__FLT_EPSILON__=1.1920928955078125e-7F",
172 "__APCS_32__=1",
173 "__GXX_WEAK__=1",
174 "__SHRT_WIDTH__=16",
175 "__USFRACT_IBIT__=0",
176 "__LDBL_MIN__=2.2250738585072014e-308L",
177 "__FRACT_MIN__=(-0.5R-0.5R)",
178 "__DEC32_MAX__=9.999999E96DF",
179 "__cpp_threadsafe_static_init=200806",
180 "__DA_IBIT__=32",
181 "__ARM_SIZEOF_MINIMAL_ENUM=1",
182 "__FLT32X_HAS_INFINITY__=1",
183 "__INT32_MAX__=0x7fffffffL",
184 "__UQQ_FBIT__=8",
185 "__INT_WIDTH__=32",
186 "__SIZEOF_LONG__=4",
187 "__UACCUM_MAX__=0XFFFFFFFFP-16UK",
188 "__UINT16_C(c)=c",
189 "__PTRDIFF_WIDTH__=32",
190 "__DECIMAL_DIG__=17",
191 "__LFRACT_EPSILON__=0x1P-31LR",
192 "__FLT64_EPSILON__=2.2204460492503131e-16F64",
193 "__ULFRACT_MIN__=0.0ULR",
194 "__INTMAX_WIDTH__=64",
195 "__FLT64_MIN_EXP__=(-1021)",
196 "__has_include_next(STR)=__has_include_next__(STR)",
197 "__LDBL_HAS_QUIET_NAN__=1",
198 "__ULACCUM_IBIT__=32",
199 "__FLT64_MANT_DIG__=53",
200 "__UACCUM_EPSILON__=0x1P-16UK",
201 "__GNUC__=9",
202 "__ULLACCUM_MAX__=0XFFFFFFFFFFFFFFFFP-32ULLK",
203 "__GXX_RTTI=1",
204 "__cpp_delegating_constructors=200604",
205 "__HQ_IBIT__=0",
206 "__FLT_HAS_DENORM__=1",
207 "__SIZEOF_LONG_DOUBLE__=8",
208 "__BIGGEST_ALIGNMENT__=8",
209 "__STDC_UTF_16__=1",
210 "__FLT64_MAX_10_EXP__=308",
211 "__GNUC_STDC_INLINE__=1",
212 "__DQ_IBIT__=0",
213 "__FLT32_HAS_INFINITY__=1",
214 "__DBL_MAX__=double(1.7976931348623157e+308L)",
215 "__ULFRACT_IBIT__=0",
216 "__cpp_raw_strings=200710",
217 "__INT_FAST32_MAX__=0x7fffffff",
218 "__DBL_HAS_INFINITY__=1",
219 "__HAVE_SPECULATION_SAFE_VALUE=1",
220 "__ACCUM_IBIT__=16",
221 "__DEC32_MIN_EXP__=(-94)",
222 "__THUMB_INTERWORK__=1",
223 "__INTPTR_WIDTH__=32",
224 "__LACCUM_MAX__=0X7FFFFFFFFFFFFFFFP-31LK",
225 "__FLT32X_HAS_DENORM__=1",
226 "__INT_FAST16_TYPE__=int",
227 "__LDBL_HAS_DENORM__=1",
228 "__cplusplus=201402L",
229 "__cpp_ref_qualifiers=200710",
230 "__DEC128_MAX__=9.999999999999999999999999999999999E6144DL",
231 "__INT_LEAST32_MAX__=0x7fffffffL",
232 "__ARM_PCS=1",
233 "__DEC32_MIN__=1E-95DF",
234 "__ACCUM_MAX__=0X7FFFFFFFP-15K",
235 "__DEPRECATED=1",
236 "__cpp_rvalue_references=200610",
237 "__DBL_MAX_EXP__=1024",
238 "__USACCUM_EPSILON__=0x1P-8UHK",
239 "__WCHAR_WIDTH__=32",
240 "__FLT32_MAX__=3.4028234663852886e+38F32",
241 "__DEC128_EPSILON__=1E-33DL",
242 "__SFRACT_MAX__=0X7FP-7HR",
243 "__FRACT_IBIT__=0",
244 "__PTRDIFF_MAX__=0x7fffffff",
245 "__UACCUM_MIN__=0.0UK",
246 "__UACCUM_IBIT__=16",
247 "__FLT32_HAS_QUIET_NAN__=1",
248 "__GNUG__=9",
249 "__LONG_LONG_MAX__=0x7fffffffffffffffLL",
250 "__SIZEOF_SIZE_T__=4",
251 "__ULACCUM_MAX__=0XFFFFFFFFFFFFFFFFP-32ULK",
252 "__cpp_nsdmi=200809",
253 "__SIZEOF_WINT_T__=4",
254 "__LONG_LONG_WIDTH__=64",
255 "__cpp_initializer_lists=200806",
256 "__FLT32_MAX_EXP__=128",
257 "__SA_IBIT__=16",
258 "__ULLACCUM_MIN__=0.0ULLK",
259 "__cpp_hex_float=201603",
260 "__GXX_ABI_VERSION=1013",
261 "__UTA_FBIT__=64",
262 "__SOFTFP__=1",
263 "__FLT_MIN_EXP__=(-125)",
264 "__USFRACT_MAX__=0XFFP-8UHR",
265 "__UFRACT_IBIT__=0",
266 "__cpp_lambdas=200907",
267 "__INT_FAST64_TYPE__=long long int",
268 "__FLT64_DENORM_MIN__=4.9406564584124654e-324F64",
269 "__DBL_MIN__=double(2.2250738585072014e-308L)",
270 "__FLT32X_EPSILON__=2.2204460492503131e-16F32x",
271 "__LACCUM_MIN__=(-0X1P31LK-0X1P31LK)",
272 "__ULLACCUM_FBIT__=32",
273 "__GXX_TYPEINFO_EQUALITY_INLINE=0",
274 "__FLT64_MIN_10_EXP__=(-307)",
275 "__ULLFRACT_EPSILON__=0x1P-64ULLR",
276 "__USES_INITFINI__=1",
277 "__DEC128_MIN__=1E-6143DL",
278 "__REGISTER_PREFIX__",
279 "__UINT16_MAX__=0xffff",
280 "__ACCUM_MIN__=(-0X1P15K-0X1P15K)",
281 "__SQ_IBIT__=0",
282 "__FLT32_MIN__=1.1754943508222875e-38F32",
283 "__UINT8_TYPE__=unsigned char",
284 "__UHA_FBIT__=8",
285 "__NO_INLINE__=1",
286 "__SFRACT_MIN__=(-0.5HR-0.5HR)",
287 "__UTQ_FBIT__=128",
288 "__FLT_MANT_DIG__=24",
289 "__LDBL_DECIMAL_DIG__=17",
290 "__VERSION__=\"9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]\"",
291 "__UINT64_C(c)=c ## ULL",
292 "__ULLFRACT_FBIT__=64",
293 "__cpp_unicode_characters=200704",
294 "__FRACT_EPSILON__=0x1P-15R",
295 "__ULACCUM_MIN__=0.0ULK",
296 "__UDA_FBIT__=32",
297 "__cpp_decltype_auto=201304",
298 "__LLACCUM_EPSILON__=0x1P-31LLK",
299 "__GCC_ATOMIC_INT_LOCK_FREE=1",
300 "__FLT32_MANT_DIG__=24",
301 "__FLOAT_WORD_ORDER__=__ORDER_LITTLE_ENDIAN__",
302 "__USFRACT_MIN__=0.0UHR",
303 "__ULLACCUM_IBIT__=32",
304 "__UQQ_IBIT__=0",
305 "__SCHAR_WIDTH__=8",
306 "__INT32_C(c)=c ## L",
307 "__DEC64_EPSILON__=1E-15DD",
308 "__ORDER_PDP_ENDIAN__=3412",
309 "__DEC128_MIN_EXP__=(-6142)",
310 "__UHQ_FBIT__=16",
311 "__LLACCUM_FBIT__=31",
312 "__FLT32_MAX_10_EXP__=38",
313 "__INT_FAST32_TYPE__=int",
314 "__UINT_LEAST16_TYPE__=short unsigned int",
315 "__DBL_HAS_DENORM__=1",
316 "__INT16_MAX__=0x7fff",
317 "__cpp_rtti=199711",
318 "__SIZE_TYPE__=unsigned int",
319 "__UINT64_MAX__=0xffffffffffffffffULL",
320 "__UDQ_FBIT__=64",
321 "__INT8_TYPE__=signed char",
322 "__cpp_digit_separators=201309",
323 "__ELF__=1",
324 "__ULFRACT_EPSILON__=0x1P-32ULR",
325 "__LLFRACT_FBIT__=63",
326 "__FLT_RADIX__=2",
327 "__INT_LEAST16_TYPE__=short int",
328 "__LDBL_EPSILON__=2.2204460492503131e-16L",
329 "__UINTMAX_C(c)=c ## ULL",
330 "__SACCUM_MAX__=0X7FFFP-7HK",
331 "__SIG_ATOMIC_MAX__=0x7fffffff",
332 "__GCC_ATOMIC_WCHAR_T_LOCK_FREE=1",
333 "__VFP_FP__=1",
334 "__SIZEOF_PTRDIFF_T__=4",
335 "__FLT32X_MANT_DIG__=53",
336 "__LACCUM_EPSILON__=0x1P-31LK",
337 "__FLT32X_MIN_EXP__=(-1021)",
338 "__DEC32_SUBNORMAL_MIN__=0.000001E-95DF",
339 "__INT_FAST16_MAX__=0x7fffffff",
340 "__FLT64_DIG__=15",
341 "__UINT_FAST32_MAX__=0xffffffffU",
342 "__UINT_LEAST64_TYPE__=long long unsigned int",
343 "__USACCUM_MAX__=0XFFFFP-8UHK",
344 "__SFRACT_EPSILON__=0x1P-7HR",
345 "__FLT_HAS_QUIET_NAN__=1",
346 "__FLT_MAX_10_EXP__=38",
347 "__LONG_MAX__=0x7fffffffL",
348 "__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL",
349 "__FLT_HAS_INFINITY__=1",
350 "__cpp_unicode_literals=200710",
351 "__USA_FBIT__=16",
352 "__UINT_FAST16_TYPE__=unsigned int",
353 "__DEC64_MAX__=9.999999999999999E384DD",
354 "__ARM_32BIT_STATE=1",
355 "__INT_FAST32_WIDTH__=32",
356 "__CHAR16_TYPE__=short unsigned int",
357 "__PRAGMA_REDEFINE_EXTNAME=1",
358 "__SIZE_WIDTH__=32",
359 "__INT_LEAST16_MAX__=0x7fff",
360 "__DEC64_MANT_DIG__=16",
361 "__INT64_MAX__=0x7fffffffffffffffLL",
362 "__UINT_LEAST32_MAX__=0xffffffffUL",
363 "__SACCUM_FBIT__=7",
364 "__FLT32_DENORM_MIN__=1.4012984643248171e-45F32",
365 "__GCC_ATOMIC_LONG_LOCK_FREE=1",
366 "__SIG_ATOMIC_WIDTH__=32",
367 "__INT_LEAST64_TYPE__=long long int",
368 "__INT16_TYPE__=short int",
369 "__INT_LEAST8_TYPE__=signed char",
370 "__SQ_FBIT__=31",
371 "__DEC32_MAX_EXP__=97",
372 "__ARM_ARCH_ISA_THUMB=1",
373 "__INT_FAST8_MAX__=0x7fffffff",
374 "__ARM_ARCH=4",
375 "__INTPTR_MAX__=0x7fffffff",
376 "__cpp_sized_deallocation=201309",
377 "__QQ_FBIT__=7",
378 "__cpp_range_based_for=200907",
379 "__UTA_IBIT__=64",
380 "__FLT64_HAS_QUIET_NAN__=1",
381 "__FLT32_MIN_10_EXP__=(-37)",
382 "__EXCEPTIONS=1",
383 "__LDBL_MANT_DIG__=53",
384 "__SFRACT_FBIT__=7",
385 "__SACCUM_MIN__=(-0X1P7HK-0X1P7HK)",
386 "__DBL_HAS_QUIET_NAN__=1",
387 "__FLT64_HAS_INFINITY__=1",
388 "__SIG_ATOMIC_MIN__=(-__SIG_ATOMIC_MAX__ - 1)",
389 "__cpp_return_type_deduction=201304",
390 "__INTPTR_TYPE__=int",
391 "__UINT16_TYPE__=short unsigned int",
392 "__WCHAR_TYPE__=unsigned int",
393 "__SIZEOF_FLOAT__=4",
394 "__USQ_FBIT__=32",
395 "__UINTPTR_MAX__=0xffffffffU",
396 "__INT_FAST64_WIDTH__=64",
397 "__DEC64_MIN_EXP__=(-382)",
398 "__cpp_decltype=200707",
399 "__FLT32_DECIMAL_DIG__=9",
400 "__INT_FAST64_MAX__=0x7fffffffffffffffLL",
401 "__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1",
402 "__FLT_DIG__=6",
403 "__UINT_FAST64_TYPE__=long long unsigned int",
404 "__INT_MAX__=0x7fffffff",
405 "__LACCUM_FBIT__=31",
406 "__USACCUM_MIN__=0.0UHK",
407 "__UHA_IBIT__=8",
408 "__INT64_TYPE__=long long int",
409 "__FLT_MAX_EXP__=128",
410 "__UTQ_IBIT__=0",
411 "__DBL_MANT_DIG__=53",
412 "__cpp_inheriting_constructors=201511",
413 "__INT_LEAST64_MAX__=0x7fffffffffffffffLL",
414 "__DEC64_MIN__=1E-383DD",
415 "__WINT_TYPE__=unsigned int",
416 "__UINT_LEAST32_TYPE__=long unsigned int",
417 "__SIZEOF_SHORT__=2",
418 "__ULLFRACT_IBIT__=0",
419 "__LDBL_MIN_EXP__=(-1021)",
420 "__arm__=1",
421 "__FLT64_MAX__=1.7976931348623157e+308F64",
422 "__UDA_IBIT__=32",
423 "__WINT_WIDTH__=32",
424 "__INT_LEAST8_MAX__=0x7f",
425 "__FLT32X_MAX_10_EXP__=308",
426 "__LFRACT_FBIT__=31",
427 "__WCHAR_UNSIGNED__=1",
428 "__LDBL_MAX_10_EXP__=308",
429 "__ATOMIC_RELAXED=0",
430 "__DBL_EPSILON__=double(2.2204460492503131e-16L)",
431 "__UINT8_C(c)=c",
432 "__FLT64_MAX_EXP__=1024",
433 "__INT_LEAST32_TYPE__=long int",
434 "__SIZEOF_WCHAR_T__=4",
435 "__LLFRACT_MAX__=0X7FFFFFFFFFFFFFFFP-63LLR",
436 "__TQ_FBIT__=127",
437 "__INT_FAST8_TYPE__=int",
438 "__ULLACCUM_EPSILON__=0x1P-32ULLK",
439 "__UHQ_IBIT__=0",
440 "__ARM_FEATURE_COPROC=1",
441 "__LLACCUM_IBIT__=32",
442 "__FLT64_HAS_DENORM__=1",
443 "__FLT32_EPSILON__=1.1920928955078125e-7F32",
444 "__DBL_DECIMAL_DIG__=17",
445 "__STDC_UTF_32__=1",
446 "__INT_FAST8_WIDTH__=32",
447 "__DEC_EVAL_METHOD__=2",
448 "__FLT32X_MAX__=1.7976931348623157e+308F32x",
449 "__TA_FBIT__=63",
450 "__UDQ_IBIT__=0",
451 "__ORDER_BIG_ENDIAN__=4321",
452 "__cpp_runtime_arrays=198712",
453 "__UINT64_TYPE__=long long unsigned int",
454 "__ACCUM_EPSILON__=0x1P-15K",
455 "__UINT32_C(c)=c ## UL",
456 "__INTMAX_MAX__=0x7fffffffffffffffLL",
457 "__cpp_alias_templates=200704",
458 "__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__",
459 "__FLT_DENORM_MIN__=1.4012984643248171e-45F",
460 "__LLFRACT_IBIT__=0",
461 "__INT8_MAX__=0x7f",
462 "__LONG_WIDTH__=32",
463 "__UINT_FAST32_TYPE__=unsigned int",
464 "__CHAR32_TYPE__=long unsigned int",
465 "__FLT_MAX__=3.4028234663852886e+38F",
466 "__cpp_constexpr=201304",
467 "__USACCUM_FBIT__=8",
468 "__INT32_TYPE__=long int",
469 "__SIZEOF_DOUBLE__=8",
470 "__cpp_exceptions=199711",
471 "__FLT_MIN_10_EXP__=(-37)",
472 "__UFRACT_EPSILON__=0x1P-16UR",
473 "__FLT64_MIN__=2.2250738585072014e-308F64",
474 "__INT_LEAST32_WIDTH__=32",
475 "__INTMAX_TYPE__=long long int",
476 "__DEC128_MAX_EXP__=6145",
477 "__FLT32X_HAS_QUIET_NAN__=1",
478 "__ATOMIC_CONSUME=1",
479 "__GNUC_MINOR__=2",
480 "__INT_FAST16_WIDTH__=32",
481 "__UINTMAX_MAX__=0xffffffffffffffffULL",
482 "__DEC32_MANT_DIG__=7",
483 "__FLT32X_DENORM_MIN__=4.9406564584124654e-324F32x",
484 "__HA_FBIT__=7",
485 "__DBL_MAX_10_EXP__=308",
486 "__LDBL_DENORM_MIN__=4.9406564584124654e-324L",
487 "__INT16_C(c)=c",
488 "__cpp_generic_lambdas=201304",
489 "__STDC__=1",
490 "__ARM_ARCH_4T__=1",
491 "__FLT32X_DIG__=15",
492 "__PTRDIFF_TYPE__=int",
493 "__LLFRACT_MIN__=(-0.5LLR-0.5LLR)",
494 "__ATOMIC_SEQ_CST=5",
495 "__DA_FBIT__=31",
496 "__UINT32_TYPE__=long unsigned int",
497 "__FLT32X_MIN_10_EXP__=(-307)",
498 "__UINTPTR_TYPE__=unsigned int",
499 "__USA_IBIT__=16",
500 "__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD",
501 "__ARM_EABI__=1",
502 "__DEC128_MANT_DIG__=34",
503 "__LDBL_MIN_10_EXP__=(-307)",
504 "__SIZEOF_LONG_LONG__=8",
505 "__ULACCUM_EPSILON__=0x1P-32ULK",
506 "__cpp_user_defined_literals=200809",
507 "__SACCUM_IBIT__=8",
508 "__GCC_ATOMIC_LLONG_LOCK_FREE=1",
509 "__FLT32X_MIN__=2.2250738585072014e-308F32x",
510 "__LDBL_DIG__=15",
511 "__FLT_DECIMAL_DIG__=9",
512 "__UINT_FAST16_MAX__=0xffffffffU",
513 "__GCC_ATOMIC_SHORT_LOCK_FREE=1",
514 "__INT_LEAST64_WIDTH__=64",
515 "__ULLFRACT_MAX__=0XFFFFFFFFFFFFFFFFP-64ULLR",
516 "__UINT_FAST8_TYPE__=unsigned int",
517 "__USFRACT_EPSILON__=0x1P-8UHR",
518 "__ULACCUM_FBIT__=32",
519 "__QQ_IBIT__=0",
520 "__cpp_init_captures=201304",
521 "__ATOMIC_ACQ_REL=4",
522 "__ATOMIC_RELEASE=3",
523 "USBCON"
524 ]
525 }
526 ]
527 }
blink/blink.ino View file @ e7e678c
File was created 1 /*
2 Blink
3
4 Turns an LED on for one second, then off for one second, repeatedly.
5
6 Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
7 it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
8 the correct LED pin independent of which board is used.
9 If you want to know what pin the on-board LED is connected to on your Arduino
10 model, check the Technical Specs of your board at:
11 https://www.arduino.cc/en/Main/Products
12
13 modified 8 May 2014
14 by Scott Fitzgerald
15 modified 2 Sep 2016
16 by Arturo Guadalupi
17 modified 8 Sep 2016
18 by Colby Newman
19
20 This example code is in the public domain.
21
22 https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
23 */
24
25 int LED_PIN = 8;
26
27 // the setup function runs once when you press reset or power the board
28 void setup()
29 {
30 // initialize digital pin LED_BUILTIN as an output.
31 pinMode(LED_PIN, OUTPUT);
32 }
33
dirwin-nano-every/.gitignore View file @ e7e678c
.pio 1 File was deleted
.vscode/.browse.c_cpp.db* 2
.vscode/c_cpp_properties.json 3
.vscode/launch.json 4
.vscode/ipch 5
dirwin-nano-every/.vscode/extensions.json View file @ e7e678c
{ 1 File was deleted
// See http://go.microsoft.com/fwlink/?LinkId=827846 2
// for the documentation about the extensions.json format 3
"recommendations": [ 4
"platformio.platformio-ide" 5
], 6
"unwantedRecommendations": [ 7
"ms-vscode.cpptools-extension-pack" 8
] 9
} 10
dirwin-nano-every/include/README View file @ e7e678c
1 File was deleted
This directory is intended for project header files. 2
3
A header file is a file containing C declarations and macro definitions 4
to be shared between several project source files. You request the use of a 5
header file in your project source file (C, C++, etc) located in `src` folder 6
by including it, with the C preprocessing directive `#include'. 7
8
```src/main.c 9
10
#include "header.h" 11
12
int main (void) 13
{ 14
... 15
} 16
``` 17
18
Including a header file produces the same results as copying the header file 19
into each source file that needs it. Such copying would be time-consuming 20
and error-prone. With a header file, the related declarations appear 21
in only one place. If they need to be changed, they can be changed in one 22
place, and programs that include the header file will automatically use the 23
new version when next recompiled. The header file eliminates the labor of 24
finding and changing all the copies as well as the risk that a failure to 25
find one copy will result in inconsistencies within a program. 26
27
In C, the usual convention is to give header files names that end with `.h'. 28
It is most portable to use only letters, digits, dashes, and underscores in 29
dirwin-nano-every/lib/README View file @ e7e678c
1 File was deleted
This directory is intended for project specific (private) libraries. 2
PlatformIO will compile them to static libraries and link into executable file. 3
4
The source code of each library should be placed in a an own separate directory 5
("lib/your_library_name/[here are source files]"). 6
7
For example, see a structure of the following two libraries `Foo` and `Bar`: 8
9
|--lib 10
| | 11
| |--Bar 12
| | |--docs 13
| | |--examples 14
| | |--src 15
| | |- Bar.c 16
| | |- Bar.h 17
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html 18
| | 19
| |--Foo 20
| | |- Foo.c 21
| | |- Foo.h 22
| | 23
| |- README --> THIS FILE 24
| 25
|- platformio.ini 26
|--src 27
|- main.c 28
29
and a contents of `src/main.c`: 30
``` 31
#include <Foo.h> 32
#include <Bar.h> 33
34
int main (void) 35
{ 36
... 37
dirwin-nano-every/platformio.ini View file @ e7e678c
; PlatformIO Project Configuration File 1 File was deleted
; 2
; Build options: build flags, source filter 3
; Upload options: custom upload port, speed and extra flags 4
; Library options: dependencies, extra library storages 5
; Advanced options: extra scripting 6
; 7
; Please visit documentation for the other options and examples 8
; https://docs.platformio.org/page/projectconf.html 9
10
[env:nano_every] 11
platform = atmelmegaavr 12
board = nano_every 13
framework = arduino 14
lib_deps = 15
arduino-libraries/SD@^1.2.4 16
dirwin-nano-every/src/main.cpp View file @ e7e678c
#include <Arduino.h> 1 File was deleted
2
// put function declarations here: 3
int myFunction(int, int); 4
5
void setup() { 6
// put your setup code here, to run once: 7
int result = myFunction(2, 3); 8
} 9
10
void loop() { 11
// put your main code here, to run repeatedly: 12
} 13
14
dirwin-nano-every/test/README View file @ e7e678c
1 File was deleted
This directory is intended for PlatformIO Test Runner and project tests. 2
3
Unit Testing is a software testing method by which individual units of 4
source code, sets of one or more MCU program modules together with associated 5
control data, usage procedures, and operating procedures, are tested to 6
determine whether they are fit for use. Unit testing finds problems early 7
in the development cycle. 8
File was created 1 #include <Arduino.h>
2 #include <RTClib.h>
3 #include <SPI.h>
4 #include <SD.h>
5
6 #define SDCARD_CS_PIN 4
7 // valves are normally closed
8 #define ONSHORE_PIN PIN_A0
9 #define OFFSHORE_PIN PIN_A1
10 // how frequently to update
11 #define DECISION_PERIOD_MS 30000
12
13 RTC_PCF8523 rtc;
14 char entry_buffer[512];
15 File logfile;
16 DateTime now;
17 volatile float wind_direction;
18 volatile float wind_velocity;
19
20 enum decision
21 {
22 ONSHORE = 0,
23 OFFSHORE = 1,
24 UNCERTAIN = 2
25 };
26
27 void setup()
28 {
29 /*
30 * Real Time Clock
31 */
32 rtc.begin();
33 if (!rtc.initialized() || rtc.lostPower())
34 {
35 Serial.println("RTC is not initialized or lost power, setting time...");
36 // When time needs to be set on a new device, or after a power loss, the
37 // following line sets the RTC to the date & time this sketch was compiled
38 DateTime set_time = DateTime(F(__DATE__), F(__TIME__));
39 rtc.adjust(set_time);
40 Serial.write(sprintf("RTC datetime set to %s", set_time.toString("MMM-DD-YYYY hh:mm:ss")));
41 }
42 else
43 {
44 now = rtc.now();
45 Serial.write(sprintf("RTC time: %s", now.toString("MMM-DD-YYYY hh:mm:ss")));
46 }
47
48 // make sure stop bit is cleared and rtc is running
49 rtc.start();
50
51 /*
52 * MicroSD card
53 */
54 // setup sd card pins
55 SD.begin(SDCARD_CS_PIN);
56 // figure out filename using newly set datetime
57 DateTime now = rtc.now();
58 char filename_string[255];
59 sprintf(filename_string, "%s.txt", now.toString("YYYY-MM-DD"));
60 // open logfile
61 logfile = SD.open(filename_string);
62
63 /*
64 * Met Station
65 */
66 // setup met station serial
67
68 /*
69 * Digital valve control pins
70 */
71 pinMode(ONSHORE_PIN, OUTPUT);
72 pinMode(OFFSHORE_PIN, OUTPUT);
73 }
74
75 void loop()
76 {
77 // grab reading
78
79 // grab time
80 now = rtc.now();
81
82 // decide on sampler settings
83 decision d = decide(wind_direction, wind_velocity);
84
85 // assemble log entry and write to SD card
86 // csv format
87 // DATETIME,WIND_DIRECTION,WIND_VELOCITY,DECISION
88 sprintf(entry_buffer, "%s,%f.2,%f.2,%i\n", now.toString("YYYY-MM-DD hh:mm:ss"), wind_direction, wind_velocity, d);
89 logfile.write(entry_buffer);
90 logfile.flush();
91
92 // delay until next decision time
93 delay(DECISION_PERIOD_MS);
94 }
95
96 decision decide(float direction, float velocity)
97 {
98 return UNCERTAIN;
99 }
100
101 void sample_onshore()
102 {
103 // open sampling to onshore valve
104 digitalWrite(ONSHORE_PIN, HIGH);
105 // wait a moment
106 delay(500);
107 // close sampling for offshore valve
108 digitalWrite(OFFSHORE_PIN, LOW);
set_pfc8523/set_pfc8523.ino View file @ e7e678c
File was created 1 #include <RTClib.h>
2
3 // https://github.com/adafruit/RTClib/blob/master/examples/pcf8523/pcf8523.ino
4
5 RTC_PCF8523 rtc;
6
7 void setup()
8 {
9 Serial.begin(9600);
10
11 rtc.begin();
12 if (!rtc.initialized() || rtc.lostPower())
13 {
14 Serial.println("RTC is not initialized or lost power, setting time...");
15 // When time needs to be set on a new device, or after a power loss, the
16 // following line sets the RTC to the date & time this sketch was compiled
17 DateTime set_time = DateTime(F(__DATE__), F(__TIME__));
18 rtc.adjust(set_time);
19 Serial.write(sprintf("RTC datetime set to %s", set_time.toString("MMM-DD-YYYY hh:mm:ss")));
20 }
21 else
22 {
23 DateTime now = rtc.now();
24 Serial.write(sprintf("RTC time: %s", now.toString("MMM-DD-YYYY hh:mm:ss")));
25 }
26
27 // make sure stop bit is cleared and rtc is running
28 rtc.start();
29 }
30