mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
added example sketches
This commit is contained in:
29
example/advanced/Ampel2/Ampel2.ino
Normal file
29
example/advanced/Ampel2/Ampel2.ino
Normal file
@ -0,0 +1,29 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot = Dezibot();
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
dezibot.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
dezibot.multiColorLight.setLed(TOP, RED);
|
||||
delay(2000);
|
||||
dezibot.multiColorLight.setLed(TOP, YELLOW);
|
||||
delay(2000);
|
||||
dezibot.multiColorLight.setLed(TOP, GREEN);
|
||||
delay(2000);
|
||||
dezibot.multiColorLight.turnOffLed();
|
||||
delay(1000);
|
||||
|
||||
for(int i=0; i<3; i++){
|
||||
dezibot.multiColorLight.setLed(TOP, GREEN);
|
||||
delay(500);
|
||||
dezibot.multiColorLight.turnOffLed();
|
||||
delay(500);
|
||||
}
|
||||
|
||||
dezibot.multiColorLight.setLed(TOP, YELLOW);
|
||||
delay(2000);
|
||||
}
|
Reference in New Issue
Block a user