Everything moves a lot smoother without serial: todo jump speed?
This commit is contained in:
parent
83a33cc202
commit
227815ac32
|
@ -22,7 +22,7 @@ void setup() {
|
||||||
windowWiperServo.attach(9);
|
windowWiperServo.attach(9);
|
||||||
|
|
||||||
// This is only useful for debugging
|
// This is only useful for debugging
|
||||||
Serial.begin(9600);
|
//Serial.begin(9600);
|
||||||
|
|
||||||
// This is the address the pi will speak to us at
|
// This is the address the pi will speak to us at
|
||||||
Wire.begin(0x4);
|
Wire.begin(0x4);
|
||||||
|
@ -30,7 +30,7 @@ void setup() {
|
||||||
// Call receiveEvent when data received
|
// Call receiveEvent when data received
|
||||||
Wire.onReceive(receiveEvent);
|
Wire.onReceive(receiveEvent);
|
||||||
|
|
||||||
Serial.println("Finished Setup.");
|
//Serial.println("Finished Setup.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Just loop to keep the running code alive, and wait for events to happen.
|
// Just loop to keep the running code alive, and wait for events to happen.
|
||||||
|
@ -55,8 +55,8 @@ void receiveEvent(int n) {
|
||||||
|
|
||||||
int value = atoi(raw_value);
|
int value = atoi(raw_value);
|
||||||
|
|
||||||
Serial.println(id);
|
//Serial.println(id);
|
||||||
Serial.println(value);
|
//Serial.println(value);
|
||||||
|
|
||||||
// Switch statements dont work on char *
|
// Switch statements dont work on char *
|
||||||
if (strcmp(id,"WIPE") == 0) // if id, and WIPE cancel out
|
if (strcmp(id,"WIPE") == 0) // if id, and WIPE cancel out
|
||||||
|
|
Loading…
Reference in New Issue