diff options
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(); +} |