Remove unnecicary loop
This commit is contained in:
@@ -33,10 +33,8 @@ void loop() {
|
|||||||
|
|
||||||
// This method runs when we receive a message
|
// This method runs when we receive a message
|
||||||
void receiveEvent(int n) {
|
void receiveEvent(int n) {
|
||||||
while (Wire.available()) { // loop through all but the last
|
id = Wire.read(); // ID of the servo/device to access
|
||||||
id = Wire.read(); // ID of the servo/device to access
|
val = Wire.read(); // Value to assign
|
||||||
val = Wire.read(); // Value to assign
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user