summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEnricoGuccii <partyka.003@gmail.com>2025-05-11 21:42:04 +0200
committerEnricoGuccii <partyka.003@gmail.com>2025-05-11 21:42:04 +0200
commit4f96161a387c3bc32ee084f14095e50ab9716b5e (patch)
treec7b0e76e5b5a5d412bed4ce0f458d197f2a07ae7 /src
parentf3a5b90d090fda687adad44e37200fa446fcf7e0 (diff)
add oled
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp60
1 files changed, 8 insertions, 52 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 84b5b85..9a6be80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -6,66 +6,22 @@
#include "motors.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.
-
-
+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");
+ //oled.drawBitmap(Logo);
}
void loop()
{
- rgb.setColorRGB(0, 255, 0, true);
- motors.forward(100, 2000);
- delay(1000);
- rgb.setColorRGB(255, 0, 0, true);
- motors.backward(100, 2000);
- delay(1000);
- rgb.setColorRGB(0, 255, 255, true);
- motors.leftTurn(100, 2000);
- delay(1000);
- rgb.setColorRGB(255, 255, 0, true);
- motors.rightTurn(100, 2000);
- delay(1000);
-
- motors.rightForward(100, 2000);
- delay(1000);
- motors.rightBackward(100, 2000);
- delay(1000);
- motors.leftForward(100, 2000);
- delay(1000);
- motors.leftBackward(100, 2000);
- delay(1000);
-
- // buzzer.playMelody(happy, 8);
- // delay(1000);
- // buzzer.playMelody(anger, 8);
- // delay(1000);
- // buzzer.playMelody(alaarm, 9);
- // delay(1000);
- // buzzer.playMelody(surprise, 9);
- // delay(1000);
-
- //buzzer.playMelody(melody, 8);
- // rgb.setColorRGB(255, 0, 0, true);
- // delay(1000);
- // rgb.fadeColor(0, 255, 0, 1000);
- // delay(1000);
- // rgb.blink(3, 500);
- // delay(1000);
- // rgb.breathe(4, 1000);
- // rgb.rainbowCycle(8000, 1.0);
- // rgb.setColorRGB(0, 0, 0, true);
- // delay(1000);
- // rgb.rainbowCycle(8000, 1);
- // rgb.setColorRGB(0, 0, 0, true);
- // delay(1000);
- // rgb.rainbowCycle(8000, 2);
+
} \ No newline at end of file