nodemecu/0x01-temperatura/arduino_0x01.ino.bak

30 lines
526 B
Arduino
Raw Permalink Normal View History

2022-03-23 19:11:54 +00:00
int inData;
void setup() {
Serial.begin(14400);
}
void loop() {
if ( Serial.available() > 0) {
inData = Serial.read();
switch (inData) {
case 0x01:
Serial.write("id:temperatura");
Serial.write(" ");
Serial.write("tp:temp");
Serial.write(" ");
Serial.write("vl:29");
Serial.write(" ");
Serial.write("un:C");
Serial.write(" ");
Serial.write("er:99");
Serial.write(" ");
Serial.write('\n');
break;
}
}
}