Hauptprogramm
Dependencies: ILI9340_Driver_Lib PM2_Libary Lib_DFPlayerMini
Diff: main.cpp
- Revision:
- 20:f825e91784fe
- Parent:
- 19:9ccd591cb637
- Child:
- 21:1aaf25fc8d53
--- a/main.cpp Thu Apr 22 14:43:14 2021 +0000 +++ b/main.cpp Thu Apr 22 15:57:47 2021 +0000 @@ -55,8 +55,6 @@ //Laufvariablen int i = 0; - Servo servo1(PA_0); - servo1.Enable(1000,20000); user_button.fall(&button_fall); user_button.rise(&button_rise); @@ -100,21 +98,12 @@ ThisThread::sleep_for(5s); //Wartet 5s.. break; //5 Minuten - case 30: i += 5; - //Servo Bewegung - for(int j=0; j<2; j++){ - for (int pos = 800; pos < 1200; pos += 25) { - servo1.SetPosition(pos); - thread_sleep_for(STEP); - } - for (int pos = 1200; pos > 800; pos -= 25) { - servo1.SetPosition(pos); - thread_sleep_for(STEP); - } - } - servo1.SetPosition(1000); + case 20: + case 10: { i += 5; + bewegung(); ThisThread::sleep_for(5s); //Wartet 5s.. break; + } //7 Minuten case 420: i += 5; //Audio Signal