1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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);
}
|