diff options
author | Starfall <us@starfall.systems> | 2025-03-04 12:34:48 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2025-03-04 12:34:48 -0600 |
commit | 5a4bf238055478d8ec53b5ff59f1f150cfc6a01e (patch) | |
tree | e9f7761ad8eb4cd10eeed197cb02e16234a3eb9b /saber.ino |
Diffstat (limited to 'saber.ino')
-rw-r--r-- | saber.ino | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/saber.ino b/saber.ino new file mode 100644 index 0000000..3ee7ca4 --- /dev/null +++ b/saber.ino @@ -0,0 +1,29 @@ +#include "input.h" +#include "blade.h" + +// TODO for simple storage #include <EEPROM.h> + +void setup() { + Serial.begin(9600); + Serial.println("Hello, world!"); + + setup_input(); + setup_blade(); +} + +void loop() { + uint32_t knob = read_knob(); + if(knob != 0) { + change_hue(16 * knob); + } + + byte button = read_button(); + if(button == EVENT_CLICK) { + toggle_blade(); + } + if(button == EVENT_HOLD) { + Serial.println("long press"); + } + + draw_blade(); +} |