This commit is contained in:
Sergio Pernas 2022-08-23 13:15:53 -03:00
parent 8c3c46056f
commit abf9d7ee0d
5 changed files with 34 additions and 43 deletions

View file

@ -0,0 +1,31 @@
// Dispositivo
int devID = 3;
char devIDstr[5];
int inQuery;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write("\n");
delay(1000);
if ( Serial.available() > 0) {
if ( inQuery == devID) {
Serial.write(itoa(devID, devIDstr, 10));
Serial.write(" ");
Serial.write("Tur");
}
}
}

View file

@ -1,42 +0,0 @@
// Dispositivo
char devIDstr[5];
int inQuery;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write("\n");
delay(1000);
if ( Serial.available() > 0) {
inQuery = Serial.read();
if ( inQuery == devID) {
Serial.write(itoa(devID, devIDstr, 10));
Serial.write(" ");
Serial.write("Tur");
Serial.write(" ");
//char lecturaStr[6]; // Buffer big enough for 7-character float
//dtostrf(getData(), 2, 4, lecturaStr); // Leave room for too large numbers!
char lecturaStr[5]; // Buffer big enough for 7-character float
dtostrf(getData(), 3, 2, lecturaStr); // Leave room for too large numbers!
Serial.write(lecturaStr);
Serial.write(" ");
Serial.write("TSS");
Serial.write(" ");
Serial.write("99");
}
}
}

2
Debug/README.md Normal file
View file

@ -0,0 +1,2 @@
### Protoboard

BIN
Debug/proto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

View file

@ -63,7 +63,7 @@ Una vez que finaliza la grabación extraer la tarjeta MicroSD y colocarla en la
Abra una terminal e instale 'git'.
```
$ sudo apt update && apt install git
$ sudo apt update && sudo apt install git
```
**Paso 2**