16 Commits

Author SHA1 Message Date
drew 10db8f6d89 implement party mode 2024-04-03 00:57:50 -06:00
drew 4a29e0c600 swap inside brightness and party buttons
- The outside button is next to the outside light, but not the inside button. This moves it beside the light and puts the party button in the middle (on the prototype board)
2024-04-03 00:56:44 -06:00
drew 69042cbe9c make brightness values configurable
- Also simplify the cycleBrightness() function with a loop
- Adjusted some of the brightness values
2024-04-02 23:57:32 -06:00
drew 972b395f5d better encapsulate InitPWM() 2024-04-02 23:43:42 -06:00
drew 772ac6a8d8 add select block to button press channel
- outchan is unbuffered, so drop the message if there's already one sitting there.
2024-04-02 16:53:35 -06:00
drew 67607347e4 remove time.Sleep() calls
- time.Sleep() blocks the entire program, other goroutines won't run. Instead, watch the button channels and filter out any extra presses within too short of a time.
2024-04-02 12:58:16 -06:00
drew 3c4b177360 remove redundant goroutines watching brightness changes 2024-04-01 07:08:47 -06:00
drew bbd231b2eb change ledset to a receiver on led 2024-04-01 06:25:20 -06:00
drew 856a6e2d88 refactor lighthardware struct
- add led struct for individual colour LEDs
2024-04-01 06:19:19 -06:00
drew 32d03ddd05 refactor to support multiple modes 2024-04-01 03:46:42 -06:00
drew aab533caaf factor out "normal" mode changes 2024-04-01 02:42:09 -06:00
drew 2dc9133e0a add second inside light 2024-04-01 02:30:37 -06:00
drew 02c4aaa43b add the outside light 2024-04-01 02:22:15 -06:00
drew c9dc844d84 initial implementation
- Single "inside" light, with inside brightness button. Cycles through the brightness settings, white light only.
2024-03-30 13:53:19 -06:00
drew 44f127a438 go mod init 2024-03-30 10:44:28 -06:00
drew eb34011673 initial commit 2024-03-30 10:42:37 -06:00