This commit is contained in:
Sergio Pernas 2022-03-23 16:21:36 -03:00
parent 998288fabc
commit c4cd7cd9b1
2 changed files with 21 additions and 1 deletions

View file

@ -1,18 +1,38 @@
int inData; int inData;
const char* valueSensor; const char* valueSensor;
const byte devID = 0x01;
void setup() { void setup() {
Serial.begin(14400); Serial.begin(14400);
} }
void loop() { void loop() {
if ( Serial.available() > 0) { if ( Serial.available() > 0) {
inData = Serial.read(); inData = Serial.read();
switch (inData) { switch (inData) {
case 0x01: case devID:
Serial.write("0x01"); Serial.write("0x01");
Serial.write(" "); Serial.write(" ");
Serial.write("hum"); Serial.write("hum");