Changed the baud rate from 9600 to 19200
Set your baudrate in Arduino to 19200. For platformio, if you want to read please manually type "pio device monitor --baud 19200" in a terminal. Be sure you have Platformio in your PATH
This commit is contained in:
parent
d46ea9d5a5
commit
745b475d8b
|
@ -7,13 +7,12 @@ int i, j;
|
||||||
unsigned long currTime; // non-blocking timer
|
unsigned long currTime; // non-blocking timer
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(19200);
|
||||||
currTime = millis();
|
currTime = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay
|
if (millis() - currTime >= WAIT_TIME) { // non-blocking time delay
|
||||||
// Serial.println();
|
|
||||||
Serial.print("[");
|
Serial.print("[");
|
||||||
for (i = 0; i < sizeof(pins)/2; i++) {
|
for (i = 0; i < sizeof(pins)/2; i++) {
|
||||||
Serial.print(analogRead(pins[i]));
|
Serial.print(analogRead(pins[i]));
|
||||||
|
@ -24,5 +23,4 @@ void loop() {
|
||||||
Serial.println("]");
|
Serial.println("]");
|
||||||
currTime = millis();
|
currTime = millis();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue