Commit graph

51 commits

Author SHA1 Message Date
Matheus Afonso Martins Moreira b9dbc4ed21 Merge PR #398 - add simon game watch face
Adds a watch face that allows playing the classic Simon game
with the watch's buzzer and RGB LED.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/398
2024-09-07 20:28:45 -03:00
joeycastillo ac5fb40730 remove dead code 2024-07-10 06:49:56 -04:00
voloved 3eaf807590
Added Timeout; Ability to turn off LED and Sound; Added doublespeed mode. (#1)
* Check that color is valid

Instead of merely checking that COLOR is set, check that it is one of
RED, BLUE or GREEN

* Added ability to turn off sound and timer with modes

* Added enum for mode

---------

Co-authored-by: Wesley Ellis <tahnok@gmail.com>
2024-07-07 19:23:31 -04:00
Jose Castillo d98d14d236
Add support for Sensor Watch Pro (#412)
* Sensor Watch Pro board definition

* Disable hot-plugging on SWCLK

* Add rainbow test

* Move interrupt mapping to board config

* New color definition for Pro boards in makefile
2024-07-06 11:07:02 -04:00
Wesley Ellis 96fdf64c4c Check that color is valid
Instead of merely checking that COLOR is set, check that it is one of
RED, BLUE or GREEN
2024-06-26 11:30:31 -04:00
Matheus Afonso Martins Moreira 4b269c5063 Merge branch 'advanced-clock+24h' into advanced
Completely refactors the simple clock face
and lays the foundations for new features.

Also adds a compile time 24 hour mode only feature.

Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/373
2024-03-08 06:54:22 -03:00
Matheus Afonso Martins Moreira 4a66035f77 faces/clock: add 24h only feature
The clock watch face can now be configured at build time
to only display the time in 24h mode. Also enabled in forced 24h mode.

This should result in smaller code size due to dead code elimination.
2024-03-05 00:46:27 -03:00
Edward Shin 5b762d0168 USB Improvements
* Introduce shell module for basic serial shell with argument parsing
* Introduce shell_cmd_list module for basic compile-time command
  registration
* Harden USB handling to hang less and drop fewer inputs
  - Service tud_task() with periodic TC0 timer interrupt
  - Service cdc_task() with periodic TC1 timer interrupt
  - Handle shell servicing in main app loop
  - Add a circular buffering layer for reads/writes
* Change newline prints to also send carriage return
* Refactor filesystem commands for shell subsystem
* Introduce new shell commands:
  - 'help' command
  - 'flash' command to reset into bootloader
  - 'stress' command to stress CDC writes

Testing:
* Shell validated on Sensor Watch Blue w/ Linux host
* Shell validated in emscripten emulator
* Tuned by spamming inputs during `stress` cmd until stack didn't crash
2024-01-07 00:20:20 -05:00
Wesley Aptekar-Cassels cda66e8c31
Merge pull request #267 from navan93/print-memory-percentages
Print memory percentages
2023-11-18 23:08:30 -05:00
Wesley Aptekar-Cassels c28ba6ef0b Don't allow building without setting board color.
Fixes: #288
2023-09-28 18:29:32 -04:00
joeycastillo 9cd39cd3e3 add new COLOR flag 2023-09-13 11:40:40 -04:00
Navaneeth Bhardwaj a5abf7ff7a Print memory percentages
this gives better idea of memories used.
2023-09-03 00:20:04 +05:30
joeycastillo fd2c8c2065 add sensor watch lite 2023-08-17 14:35:51 -04:00
joeycastillo 6a69e0a691 prep for red boards 2023-07-29 07:01:19 -04:00
Christian Chapman 462f24b313
Aperture priority light meter face (#230)
* initial commit, added opt3001 light meter test app

* tested working light meter board, i2c communication still has issues

* fixed i2c; rudimentary lightmeter works!

* added aperture priority ui

* added aperture priority ui

* added README

* adjusted cal

* fixed bugs (HI shutter speed, lux mode toggle)

* made it possible to advance to the next face

* initialized lux variable

* lowered tolerance for HI and LO

* Changed EV display from always showing EV100 to showing EV[iso setting]

* dont display old ev when ISO changes

* changed mode and light behavior

* updated readme

* fixed indentation

* made lightmeter display logic more consistent

* made lightmeter display logic more consistent

* reverted rules.mk (for merge into upstream)

* reverted rules.mk (for merge into upstream)

* removed OPT3001 PCB model

* made lux mode default, corrected timeout behavior

---------

Co-authored-by: Christian Chapman <user@debian>
2023-04-16 10:05:55 -04:00
joeycastillo e32f1d1926 rename definition for special edition boards 2023-01-25 10:32:35 -06:00
James Haggerty ad6e919107 Separate emscripten build directory
This avoids the need to 'make clean' before you do a simulator build
(or vice-versa).
2022-11-02 06:18:34 +11:00
James Haggerty 07f439c598 Fix Linux Makefile parallelism
Makefile != bourne shell, I think.

At least on my systems, this was causing a raw -j, which meant
that make had no restriction on its parallelism
(i.e. tried to build everything at once).
2022-10-25 09:24:54 +11:00
Michael Gruenewald 1138d4d80c Enable dependency files for the emscripten build 2022-10-08 13:52:00 +02:00
Joey Castillo bcd3b66684 Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into lfs 2022-08-02 08:17:26 -06:00
Wesley Ellis 6f96e848c2 Replace python with python3 for calling uf2conv
Instead of calling python use python3.

On a default debian 11 install there is no python binary, only python3.
Given that the uf2conv script is written for python 3 I think this is a
safe change to make
2022-07-14 14:42:32 -04:00
George Hahn 190dca0a77 fixup: restore deleted line 2022-05-10 00:42:43 -06:00
George Hahn 0ab63691f2 Move parallel flag into makefile with crossplatform support 2022-05-10 00:37:37 -06:00
George Hahn 0269681ac3 Perform OS detection in makefile 2022-05-10 00:37:02 -06:00
Joey Castillo d4ebe64af0 add support for a small filesystem on the watch 2022-05-06 17:12:14 -04:00
Joey Castillo b0bdf35d8f add mechanism for building alternate firmware images 2022-04-20 17:21:47 -04:00
Joey Castillo 3eb3821009 make A1-05 the default board (final hardware) 2022-04-10 15:57:13 -04:00
Joey Castillo 51e357d822 movement: final list of watch faces for stock firmware 2022-04-02 10:07:18 -04:00
Joey Castillo deda65b313 no need to build lis2dh driver anymore 2022-02-17 14:48:40 -05:00
Joey Castillo 4f29cf24f3 movement: move thermistor to 'sensor' watch faces 2022-02-17 14:47:47 -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 523a5d2f0b implement SPI flash chip 2022-01-26 22:40:49 -05:00
Joey Castillo a11275d84c watch library: implement SPI 2022-01-26 21:33:05 -05:00
Joey Castillo 0c78fdf535 watch library: implement UART 2022-01-26 19:31:49 -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
joeycastillo d566a68da5
fix filename capitalization 2022-01-08 20:30:02 -05:00
Joey Castillo 496530c85c add driver, test app for LIS2DW accelerometer 2022-01-08 19:27:41 -05:00
Willian Paixao 67d98133aa
introduce github actions 2021-12-11 19:47:39 +01:00
Joey Castillo 470544823b add LIS2DH accelerometer driver, test app 2021-11-27 13:32:33 -05:00
Joey Castillo 711e8762a6 link math library 2021-11-22 12:09:52 -05:00
Joey Castillo f98bc9bb4e steps toward SPI support in watch library 2021-10-25 16:06:08 -04:00
Joey Castillo 8f6cd8b290 move weekday lookup to new utilities file 2021-10-23 16:13:11 -04:00
Joey Castillo 52c5747d2e getting the sensor watch dev board working 2021-10-19 10:14:24 -04:00
Joey Castillo 39a17c99b9 overdue refactor: compile all watch modules separately 2021-09-28 14:42:56 -04:00
Joey Castillo b353e47506 remove unused ASF code 2021-09-27 17:51:52 -04:00
Joey Castillo 07420e6ead move apps to subdirectory, add relative path support to Makefile 2021-09-16 15:40:01 -04:00
Joey Castillo 5a53916f0e first steps toward supporting alternate board pinouts 2021-09-13 16:44:07 -04:00
Joey Castillo cd935193e3 remove unused ASF code 2021-09-13 13:21:33 -04:00
Joey Castillo 71e411d860 handle watch variant with red/blue LED 2021-08-31 20:29:13 -04:00