From 4bd0a060d100c7fb9ad657c939b954b081b62016 Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Tue, 23 Dec 2025 16:59:20 +0100 Subject: eee --- firmware/src/main.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 firmware/src/main.cpp (limited to 'firmware/src/main.cpp') diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp new file mode 100644 index 0000000..880856f --- /dev/null +++ b/firmware/src/main.cpp @@ -0,0 +1,37 @@ +#include "buzzer.h" +#include "motors.h" +#include "oled.h" +#include "rgb.h" +#include "settings.h" +#include + +#include "animations.h" + +RGB rgb; +BUZZER buzzer; +MOTORS motors; // speed 80 is prefered, because of higher input voltage (5V + // -> 3.7V after H-bridge), motor is rated for 3V +// in practice, speed below 70 dosn't even work. +OLED oled; + +void setup() { + rgb.init(); + buzzer.init(); + motors.init(); + oled.init(); + oled.showMessage("czesc"); + delay(3000); +} + +void loop() { + oled.showAnimation(animacja1[0], animacja1FrameCount, animacja1Width, + animacja1Height, 160); + oled.showAnimation(animacja1[0], animacja1FrameCount, animacja1Width, + animacja1Height, 80); + oled.showAnimation(animacja1[0], animacja1FrameCount, animacja1Width + 20, + animacja1Height, 50); // fajny efekt + oled.showAnimation(animacja2[0], animacja2FrameCount, animacja2Width, + animacja2Height, 160); + oled.showAnimation(animacja2[0], animacja2FrameCount, animacja2Width, + animacja2Height, 80); +} -- cgit v1.2.3