Author Topic: ESP32 (Arduino on PlatformIO; Serial.println error)  (Read 1995 times)

0 Members and 1 Guest are viewing this topic.

Offline etiTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
ESP32 (Arduino on PlatformIO; Serial.println error)
« on: October 10, 2022, 07:21:31 am »
Hi all.

Using Arduino code for an ESP32, PlatformIO on VS  Code, I'm testing this basic code, and I get junk on the serial monitor. Yes, the "monitor_speed=9600" is set in the .ini file. Thanks. Any idea; do I need to add a short delay after the println() ?

Code: [Select]
#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(":) Hey");
}
 

Offline timenutgoblin

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: ESP32 (Arduino on PlatformIO; Serial.println error)
« Reply #1 on: October 10, 2022, 09:12:54 am »
Maybe this will work... add a delay...

Code: [Select]
#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(":) Hey");
  delay(2000);
}

Source: https://techtutorialsx.com/2017/04/24/esp32-hello-world/

I should point out that I'm not experienced with Arduino, but I hope it works.
 
The following users thanked this post: eti

Offline etiTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Re: ESP32 (Arduino on PlatformIO; Serial.println error)
« Reply #2 on: October 10, 2022, 05:56:07 pm »
Maybe this will work... add a delay...

Code: [Select]
#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(":) Hey");
  delay(2000);
}

Source: https://techtutorialsx.com/2017/04/24/esp32-hello-world/

I should point out that I'm not experienced with Arduino, but I hope it works.

Thanks very much indeed :) - I appreciate it, and I appreciate it that you didn't talk down to me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf