I have Platformio on two machines. When working on one to track a coding fault I was monitoring the output to a UNO when I had to move t the other machine.
Same code and setup the monitor displayed garbage.
So I changed to a simple code.
Main.cpp
#include <Arduino.h>
#define GREENLED 13
void setup()
{
Serial.begin(9600);
Serial.println(“Start”);
pinMode(GREENLED, OUTPUT);
}
void loop() {
digitalWrite(GREENLED, LOW);
Serial.println(“The greenled is off”);
delay(1000);
digitalWrite(GREENLED,HIGH);
Serial.println(“the greenle is on”);
delay(1000);
}
Platform.ini
Platform.ini
[env:uno]
platform = atmelavr
board = uno
framework = arduino
upload_port = COM7
monitor_speed = 9600
I changed the baud rate in both from 9600 - 19200 – 38400 – 57600.
Still garbage.
Just in case PlatformIO had gliched I uninstalled VSCode as a clean unistall.
Windows - Delete %APPDATA%\Code and %USERPROFILE%.vscode.
Removed the VSCode download . Downloaded again and reinstalled VSCode.
Ran the Arduino code again, still garbage. Closed Platformio and ran the program on Arduino IDE. Runs properly monitor works
I ran the code on the other machine. Runs properly monitor works.
I ran the program on this machine on PlatformIO. Still garbage. While the program was running turned on ArduinoIDE and set it to Com7 with this result.
What am I doing wrong?