Trabalho final

parent 4b070642
......@@ -138,7 +138,7 @@ void loop() {
last_ADDR = SLAVE1_ADDR;
}
}
}else if(buttonState1 == 1){
else if(buttonState1 == 1){
if(last_ADDR == SLAVE1_ADDR){
send_data(0);
} else {
......@@ -147,7 +147,7 @@ void loop() {
last_ADDR = SLAVE1_ADDR;
}
}
}
if(buttonState2 != lastButtonState2){
......@@ -160,7 +160,7 @@ void loop() {
last_ADDR = SLAVE2_ADDR;
}
}
}else if(buttonState2 == 1){
else if(buttonState2 == 1){
if(last_ADDR == SLAVE2_ADDR){
send_data(0);
} else {
......@@ -169,7 +169,7 @@ void loop() {
last_ADDR = SLAVE2_ADDR;
}
}
}
}
......@@ -187,4 +187,4 @@ void loop() {
if(getData==0)
digitalWrite(LED_PIN,*data);
}
}
\ No newline at end of file
}
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