diff --git a/crawler_software/arduino/crawler_slave/crawler_slave.ino b/crawler_software/arduino/crawler_slave/crawler_slave.ino index e3e6cad..8a1d2ee 100644 --- a/crawler_software/arduino/crawler_slave/crawler_slave.ino +++ b/crawler_software/arduino/crawler_slave/crawler_slave.ino @@ -33,10 +33,8 @@ void loop() { // This method runs when we receive a message void receiveEvent(int n) { - while (Wire.available()) { // loop through all but the last - id = Wire.read(); // ID of the servo/device to access - val = Wire.read(); // Value to assign - } + id = Wire.read(); // ID of the servo/device to access + val = Wire.read(); // Value to assign switch(id) { case 1: