Commit 9462aff0 authored by nanooq's avatar nanooq
Browse files

add jakbob blinkt blau und bob blinkt grün

parent 00e12216
#include <BOB3.h>
void setup();
void loop();
void loop_jakbob();
void loop_bob();
const int ID_JAKBOB =20;
const int ID_BOB = 16;
int message;
int arm1;
int arm2;
void setup() {
bob3.setEyes(OFF, OFF);
int id = bob3.getID();
if (id == ID_JAKBOB) {
bob3.setEyes(BLUE, BLUE);
delay(500);
}
if (id == ID_BOB) {
bob3.setEyes(GREEN, GREEN);
delay(500);
}
bob3.setEyes(OFF, OFF);
delay(500);
}
void loop() {
int id = bob3.getID();
if (id == ID_JAKBOB) {
loop_jakbob();
} else if (id == ID_BOB) {
loop_bob();
}
}
void loop_bob() {
bob3.setEyes(GREEN, GREEN);
delay(500);
bob3.setEyes(OFF, OFF);
delay(500);
}
void loop_jakbob() {
bob3.setEyes(BLUE, BLUE);
delay(500);
bob3.setEyes(OFF, OFF);
delay(500);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment