Joey Castillo
21f8a9f7cf
slcd: lower reference refresh frequency (saves energy)
2022-02-11 12:19:10 -05:00
Joey Castillo
87be905fee
rtc: disable debouncing on external wake inputs
2022-02-11 12:18:16 -05:00
Joey Castillo
27fa69ccac
eic: clock from OSCULP32K for power savings
2022-02-11 12:17:55 -05:00
Joey Castillo
108b9991d2
simulator: add geolocation support
2022-02-09 13:40:29 -05:00
Joey Castillo
aae9160422
utility: add function for formatting a duration in days + HMS
2022-02-06 15:00:58 -05:00
Joey Castillo
df0c2bfd80
remove debug statements
2022-02-05 17:33:34 -05:00
Joey Castillo
a3085cb136
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch
2022-02-01 00:24:20 -05:00
Joey Castillo
518a9aa919
add function for converting to 12 hour time
2022-01-31 21:17:10 -08:00
joeycastillo
932e10529d
Merge pull request #43 from a2/rtc-disable-matching-mask
...
Add new function to disable certain RTC periodic callbacks
2022-01-27 14:33:45 -05:00
Joey Castillo
5fb8dabdd2
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main
2022-01-27 14:28:46 -05:00
Joey Castillo
45aa04f4ac
spi test: set first 4096 bytes to 0
2022-01-27 14:28:37 -05:00
Alexsander Akers
a4cb3c8594
Adjust function semantics by "flipping" bit order
2022-01-27 12:06:06 -05:00
Alexsander Akers
a559d089f1
Add new function to disable certain RTC periodic callbacks
2022-01-27 12:06:06 -05:00
Alexsander Akers
cb8223217b
Update main loop to fix reentrancy runtime errors
2022-01-27 11:12:01 -05:00
Alexsander Akers
a0f8e9c8bc
Implement buzzer methods with AudioContext API
2022-01-27 11:12:01 -05:00
Joey Castillo
14e4562b7a
add SPI to the index
2022-01-27 10:51:15 -05:00
Joey Castillo
523a5d2f0b
implement SPI flash chip
2022-01-26 22:40:49 -05:00
Joey Castillo
b2dbc4feeb
silence compiler warning
2022-01-26 22:15:53 -05:00
Joey Castillo
a11275d84c
watch library: implement SPI
2022-01-26 21:33:05 -05:00
Joey Castillo
1b1bba2de0
silence compiler warning
2022-01-26 21:04:56 -05:00
Joey Castillo
fe5a3eecff
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main
2022-01-26 20:36:49 -05:00
Joey Castillo
d65103b03b
silence compiler warnings
2022-01-26 20:16:52 -05:00
Joey Castillo
0c78fdf535
watch library: implement UART
2022-01-26 19:31:49 -05:00
Alexsander Akers
84b65cb699
Remove ADC_* defines in favor of hardware-specific mapping
2022-01-25 17:28:15 -05:00
Alexsander Akers
b8de35658f
Sensor Watch Simulator ( #35 )
...
* Put something on screen
* Use the 32bit watch_date_time repr to pass from JS
* Implement periodic callbacks
* Clear display on enabling
* Hook up watch_set_led_color() to SVG (green-only)
* Make debug output full-width
* Remove default Emscripten canvas
* Implement sleep and button clicks
* Fix time zone conversion bug in beats-time app
* Clean up warnings
* Fix pin levels
* Set time zone to browser value (if available)
* Add basic backup data saving
* Silence format specifier warnings in both targets
* Remove unnecessary, copied files
* Use RTC pointer to clear callbacks (if available)
* Use preprocessor define to avoid hardcoding MOVEMENT_NUM_FACES
* Change each face to const preprocessor definition
* Remove Intl.DateTimeFormat usage
* Update shell.html title, header
* Add touch start/end event handlers on SVG buttons
* Update shell.html
* Update folder structure (shared, simulator, hardware under watch-library)
* Tease out shared components from watch_slcd
* Clean up simulator watch_slcd.c inline JS calls
* Fix missing newlines at end of file
* Add simulator warnings (except format, unused-paremter)
* Implement remaining watch_rtc functions
* Fix button bug on mouse down then drag out
* Implement remaining watch_slcd functions
* Link keyboard events to buttons (for keys A, L, M)
* Rewrite event handling (mouse, touch, keyboard) in C
* Set explicit text UTF-8 charset in shell.html
* Address PR comments
* Remove unused directories from include paths
2022-01-25 15:03:22 -05:00
Joey Castillo
68f17c8970
movement: add time zone conversion in sunrise/sunset face
2022-01-21 00:11:43 -05:00
Joey Castillo
3efdcd78a1
fix out of bounds access when position != 0
2022-01-19 17:22:31 -05:00
Joey Castillo
19fd519209
add gettimeofday function
2022-01-15 12:26:17 -05:00
Joey Castillo
68e792f9b7
lis2dw: add low power / low noise mode
2022-01-09 12:25:56 -05:00
Joey Castillo
a102675522
set correct registers for range and rate
2022-01-09 12:12:41 -05:00
Joey Castillo
54762248a3
use lowest power LP mode
2022-01-09 12:06:44 -05:00
Joey Castillo
71c2eaa3f9
shuffle uart pins for new accelerometer board
2022-01-09 12:05:21 -05:00
Joey Castillo
5ceec26d5a
start in low power mode
2022-01-09 12:02:58 -05:00
Joey Castillo
1ea476ca24
remove unused enums
2022-01-09 12:02:26 -05:00
Joey Castillo
496530c85c
add driver, test app for LIS2DW accelerometer
2022-01-08 19:27:41 -05:00
Joey Castillo
b341227797
add utility function to check if TCC is enabled
2021-12-21 10:01:33 -06:00
Joey Castillo
762af872d2
fix missing prototype warnings
2021-12-10 12:00:26 -05:00
Joey Castillo
bbd394a19a
use true random number generator to provide entropy
2021-12-03 21:12:15 -05:00
Joey Castillo
b8c824419f
remove A LOT of dead ASF lcd driver code
2021-12-02 22:50:47 -05:00
Joey Castillo
36be251e89
lis2dh: add support for interrupt latching (stays active until cleared)
2021-12-01 09:41:48 -05:00
Joey Castillo
45282f2ef4
lis2dh driver: add support for int2 pin
2021-11-30 20:02:41 -05:00
Joey Castillo
4ae46f907b
lis2dh driver: add basic interrupt functionality
2021-11-30 19:33:49 -05:00
Joey Castillo
48ceef7af3
fix (most) external interrupts on the 9-pin connector
2021-11-30 17:02:42 -05:00
Joey Castillo
473bd1637a
lis2dh driver: make the implicit explicit
2021-11-30 11:55:16 -05:00
Joey Castillo
812c6c2612
more character map edge cases
2021-11-29 10:28:02 -05:00
Joey Castillo
470544823b
add LIS2DH accelerometer driver, test app
2021-11-27 13:32:33 -05:00
Joey Castillo
4a4ab81c6c
remove log statements (oops)
2021-11-25 13:18:10 -05:00
Joey Castillo
ac43c1ca48
utilities: convert unix timestamp to watch_date_time
2021-11-25 11:10:06 -05:00
Joey Castillo
5c3967aea2
movement: implement time zone setting
2021-11-25 10:36:01 -05:00
Wesley Ellis
653dd862b8
Fill out watch_utility_convert_to_unix_time
2021-11-23 21:32:25 -05:00
joeycastillo
f9e3dc865d
add stubs for UNIX timestamp conversion
2021-11-23 15:57:18 -05:00
joeycastillo
ad558da328
add stubs for UNIX timestamp conversion
2021-11-23 15:54:12 -05:00
Joey Castillo
7817e6696e
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main
2021-11-22 17:35:50 -05:00
Joey Castillo
0ca729eaba
move thermistor calculation to watch utilities
2021-11-22 17:31:51 -05:00
Joey Castillo
0f03257ee9
movement: add voltage monitor watch face
2021-11-06 23:52:00 -04:00
Joey Castillo
2d6fcd77ab
add ability to preview display on USB serial
2021-10-29 12:09:45 -04:00
Joey Castillo
f98bc9bb4e
steps toward SPI support in watch library
2021-10-25 16:06:08 -04:00
Joey Castillo
22c072ac3f
Merge branch 'main' into more-asf-files
2021-10-25 14:52:40 -04:00
Joey Castillo
8f6cd8b290
move weekday lookup to new utilities file
2021-10-23 16:13:11 -04:00
Joey Castillo
f1a706792e
movement: add character set demo
2021-10-21 17:28:59 -04:00
Joey Castillo
4df23ea9f9
typo in documentation: all five pins are analog capable
2021-10-21 15:10:06 -04:00
Joey Castillo
38a2dff234
more accurate names for deep sleep and shallow sleep modes
2021-10-20 13:45:22 -04:00
Joey Castillo
148a47f76a
movement: add tick animation in sleep mode
2021-10-19 15:37:08 -04:00
Joey Castillo
52c5747d2e
getting the sensor watch dev board working
2021-10-19 10:14:24 -04:00
joeycastillo
6210e1c233
Merge pull request #17 from joeycastillo/wip-launcher
...
Resolves #13
2021-10-18 15:37:41 -04:00
Joey Castillo
7f8973a8cc
slcd: add more special cases
2021-10-04 14:12:39 -04:00
Joey Castillo
4300dff616
launcher: first crack at low power 'screensaver' mode
2021-10-03 20:47:15 -04:00
Joey Castillo
8d5280a34f
slcd: add function to blank entire screen
2021-10-03 18:48:55 -04:00
Joey Castillo
84c0fbfa2a
slcd: add autonomous blinking and animation
2021-10-01 20:53:32 -04:00
Joey Castillo
6334af0136
tweak to API nomenclature: tick happens once a second, other interrupts are periodic
2021-09-28 19:18:42 -04:00
Joey Castillo
9da9dfb7b2
rtc: support periodic ticks at intervals from 1 to 128 Hz
2021-09-28 15:13:09 -04:00
Joey Castillo
39a17c99b9
overdue refactor: compile all watch modules separately
2021-09-28 14:42:56 -04:00
Joey Castillo
152ba8aec6
simplification: return date/time in same format as clock register
2021-09-28 11:06:27 -04:00
Joey Castillo
b353e47506
remove unused ASF code
2021-09-27 17:51:52 -04:00
Joey Castillo
a65dcf1ec8
WIP: refactor RTC to use clock mode directly
2021-09-27 17:42:27 -04:00
joeycastillo
115c555c4c
this was an odd typo
2021-09-24 17:05:18 -04:00
Joey Castillo
7945f4c4a3
add warning about external wake on old board rev
2021-09-23 17:27:41 -04:00
Joey Castillo
a23901f843
final deep sleep refactor: retain RAM, call it shallow sleep mode
2021-09-23 14:57:30 -04:00
Joey Castillo
fd5e8046d0
support alternate LCD pinouts
2021-09-21 15:50:43 -04:00
Joey Castillo
24e160611e
add more atmel studio framework code
2021-09-20 17:37:55 -04:00
Joey Castillo
9baec59217
support common anode LEDs
2021-09-18 14:50:20 -04:00
Joey Castillo
5ff4a88374
add a new deep sleep mode alongside backup mode
2021-09-18 14:50:20 -04:00
Joey Castillo
d97e74058f
fix USB VID/PID
2021-09-18 14:03:46 -04:00
Joey Castillo
21a627aad6
lcd: add special case for T in position 1 ( fixes #10 )
2021-09-14 15:19:21 -04:00
Joey Castillo
cb98f29e57
more work on alternate board pinouts
2021-09-14 15:12:30 -04:00
Joey Castillo
e4c1700806
remove unused ASF config files
2021-09-14 01:07:02 -04:00
Joey Castillo
05c816960b
deprecate debug UART
2021-09-13 23:39:24 -04:00
Joey Castillo
5a53916f0e
first steps toward supporting alternate board pinouts
2021-09-13 16:44:07 -04:00
Joey Castillo
5cd6b1afc7
improve consistency of function names
2021-09-13 13:41:28 -04:00
Joey Castillo
cd935193e3
remove unused ASF code
2021-09-13 13:21:33 -04:00
Joey Castillo
66d45c521e
implement ADC functionality
2021-09-13 09:48:31 -04:00
Joey Castillo
71e411d860
handle watch variant with red/blue LED
2021-08-31 20:29:13 -04:00
Joey Castillo
637964ae4b
simplify: always use the TCC to drive the LEDs
2021-08-31 19:38:06 -04:00
Joey Castillo
b22915431b
add method for detecting low battery
2021-08-31 19:02:44 -04:00
Joey Castillo
fbd9ae4b67
run watch at 4 MHz unless USB is enabled
2021-08-30 17:35:47 -04:00
Joey Castillo
b0845cc3f1
fix typo
2021-08-30 14:37:14 -04:00
Joey Castillo
53053ad89a
SIMPLIFY! Always run the main clock at 8 MHz
2021-08-30 14:03:43 -04:00
Joey Castillo
27ce7003b3
remove unused TC/TCC driver code
2021-08-29 17:47:33 -04:00
Joey Castillo
6353d25d46
big PWM refactor: drive both LEDs and buzzer from TCC
2021-08-29 17:40:44 -04:00
Joey Castillo
7dc4b0fdc6
WIP TCC refactor; remove low frequency notes
2021-08-29 17:13:41 -04:00
Joey Castillo
34ec77c7fd
handle changing CPU speed
2021-08-29 17:11:31 -04:00
Joey Castillo
74950b110e
enable USB earlier so app can log sooner
2021-08-29 15:42:37 -04:00
Joey Castillo
ef0ed276a5
handle tinyusb device tasks on a timer, allows delays in app
2021-08-28 19:53:12 -04:00
Joey Castillo
27e3863a05
add alternate _write for debugging USB issues
2021-08-28 19:44:52 -04:00
Joey Castillo
048b5c1d3f
force sending data after a _write
2021-08-28 19:34:31 -04:00
Joey Castillo
52ba3b3710
fix buzzer demo, add note about extwake
2021-08-28 14:46:58 -04:00
Joey Castillo
3e45de7dea
implement USB console
2021-08-28 13:55:17 -04:00
Joey Castillo
d09d3c3c95
external interrupt refactor: allow enabling in watch library functions
2021-08-25 12:15:58 -06:00
Joey Castillo
c35e8e2b07
disable all external interrupts by default
2021-08-25 12:14:30 -06:00
Joey Castillo
df94a83bf5
add majority-vote filtering to all external interrupt pins
2021-08-25 12:10:40 -06:00
Joey Castillo
9a5f6c0de0
disable all RTC tamper interrupts by default
2021-08-25 12:08:33 -06:00
Joey Castillo
d7544276df
add definitions for pin A3/A4 (same as D0/D1)
2021-08-25 12:04:38 -06:00
Joey Castillo
2c6c605372
silence unused parameter warnings
2021-08-24 21:28:52 -06:00
Joey Castillo
89c8e3db54
remove watch_app.c
2021-08-24 10:12:05 -06:00
Joey Castillo
67b749f3af
refactor: break out different areas of functionality
2021-08-23 08:11:49 -06:00
Joey Castillo
f9c8a935e6
move debug uart methods, clarify license info
2021-08-17 13:16:38 -04:00
Joey Castillo
5149520563
disable 9-pin extwake interrupts by default
2021-08-17 13:12:34 -04:00
Joey Castillo
059dcfc181
disable debug UART by default
2021-08-14 19:16:18 -04:00
Joey Castillo
efd75d2504
led tweaks
2021-08-14 19:15:51 -04:00
Joey Castillo
7caa6ff19a
document power consumption, etc
2021-08-11 01:08:46 -04:00
Joey Castillo
1ab1d3fff2
check if callback is null (could happen in wake from backup)
2021-08-10 22:07:30 -04:00
Joey Castillo
616e4fb105
add API for playing sounds from the buzzer
2021-08-08 20:17:08 -04:00
Joey Castillo
ca96db1ef5
add link to errata
2021-08-08 15:14:36 -04:00
Joey Castillo
ac7807d9f5
document indicator segments
2021-08-08 15:12:12 -04:00
Joey Castillo
e45fdf15af
work on RTC tamper interrupt and external wake
2021-08-08 15:02:38 -04:00
Joey Castillo
27edc50be1
fix renaming of _watch_rtc_is_enabled
2021-08-08 15:02:04 -04:00
Joey Castillo
792665c7fe
add segment map link
2021-08-07 13:48:01 -04:00
Joey Castillo
973efe7edc
add notes to segment map
2021-08-07 13:34:36 -04:00
Joey Castillo
754fb60ee7
add more notes to character set
2021-08-07 13:30:28 -04:00
Joey Castillo
a2573d7e0a
rename 'sensing' indicator to 'signal'
2021-08-07 13:26:05 -04:00
Joey Castillo
f102be4864
segment lcd: add indicator methods, document character map
2021-08-07 11:22:49 -04:00
Joey Castillo
9fca9c7188
documentation tweaks
2021-08-05 16:15:53 -04:00
Joey Castillo
4e0f249bd2
documentation!
2021-08-05 16:04:03 -04:00
Joey Castillo
021a901bc1
some I2C work
2021-08-04 18:33:40 -04:00
Joey Castillo
15050f8ace
drop legacy terminology. how hard was that?
2021-08-04 12:09:33 -04:00
Joey Castillo
99942154f7
break up sections
2021-08-04 11:54:39 -04:00
Joey Castillo
fc31739eb6
WIP deep sleep mode
2021-08-03 18:09:58 -04:00
Joey Castillo
d2e43d132c
move app.h to library, no need for user to change it
2021-08-02 17:34:35 -04:00
Joey Castillo
8b92a1b44a
thinking through deep sleep stuff
2021-08-02 16:14:47 -04:00
Joey Castillo
34945d78e9
major project reorg, move library one level up
2021-08-02 14:36:04 -04:00