diff options
| author | EnricoGuccii <partyka.003@proton.me> | 2026-05-29 23:34:00 +0200 |
|---|---|---|
| committer | EnricoGuccii <partyka.003@proton.me> | 2026-05-29 23:34:00 +0200 |
| commit | d3b283c69e9cf5ac6fe18c25be77a9b0488b9454 (patch) | |
| tree | b39c0bda024eb053a0daab7b938be72a7d3e470e /src | |
| parent | 4bd0a060d100c7fb9ad657c939b954b081b62016 (diff) | |
new file structure, and buzzer removed
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..891c11d --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,41 @@ +#include <Arduino.h>
+// #include "esp32-hal.h"
+#include "motors.h"
+#include "rgb.h"
+#include "buzzer.h"
+
+#include "oled.h"
+#include "animations.h"
+
+
+RGB rgb;
+BUZZER buzzer;
+MOTORS motors;
+OLED oled;
+
+
+
+void setup() {
+ motors.init();
+ rgb.init();
+
+ rgb.setColorRGB(0, 0, 0, true);
+
+ oled.init();
+ delay(2000);
+}
+
+void loop() {
+ oled.showAnimation(animacja1[0], animacja1FrameCount, animacja1Width,
+ animacja1Height, 160);
+ 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);
+ rgb.rainbowCycle(2000, 7);
+
+ motors.rightForward(100,4000);
+ motors.leftForward(100,4000);
+}
|