25 lines
254 B
C++
25 lines
254 B
C++
|
|
|
|
|
|
|
|
// Dispositivo
|
|
const int devID = 1;
|
|
int inQuery;
|
|
|
|
|
|
void setup() {
|
|
Serial.begin(9600);
|
|
|
|
}
|
|
void loop() {
|
|
|
|
if ( Serial.available() > 0) {
|
|
inQuery = Serial.read();
|
|
if ( inQuery == devID) {
|
|
Serial.write("1");
|
|
delay(100);
|
|
|
|
}
|
|
|
|
}
|
|
}
|