Hello there !
Today I thought of moving from Arduino IDE to PlatformIO IDE, because I’ve found some things that don’t work in Arduino IDE but do in PlatformIO IDE. Also I’ve used VC Studio in the past for C# and I loved it.
I just finished building my first project in Platformio IDE and I am left with some questions.
-
Where can I find settings for ESP32 board ? Like the ones in Arduino IDE ? Image
-
Should it be easy to use ? I don’t find it easy to use and the documentation makes it even harder to understand.
2.1 What do I do with -b
, --baud
. Where should I write these ? Why doesn’t it tell me where to write this code ?
2.2 What do I do with this ?
[env:custom_monitor_port]
...
; Unix
monitor_port = /dev/ttyUSB1
; Windows
monitor_port = COM3
I didn’t understand a thing from this:
docs.platformio.()org/en/latest/projectconf/section_env_monitor.html#monitor-speed
[Remove the brackets () .New users can’t post more than 2 links in a post]
Shouldn’t the documentation be easier ? Or am I a bigger idiot that I thought I was ?
I posted this because I have a problem with the Serial Monitor. It outputs ? characters. Image
#include "Arduino.h"
#include <SPIFFS.h>
#include <WiFi.h>
String v[2];
void setup() {
Serial.begin(115200);
if (!SPIFFS.begin(true)) {
Serial.println("An Error has occurred while mounting SPIFFS");
return;
}
//---------- Read file
File fileToRead = SPIFFS.open("/inputs.txt");
if(!fileToRead){
Serial.println("Failed to open file for reading");
return;
}
Serial.println("File Content: ");
int i = 0;
while(fileToRead.available()){
String line= fileToRead.readStringUntil('\n');
v[i] = line;
i++;
String string2 = String("Linia ") + i + ": " + line;
Serial.println(string2);
Serial.println();
}
fileToRead.close();
for(i = 0; i<2; i++) {
Serial.println(v[i]);
}
WiFi.begin(v[0].c_str(),v[1].c_str());
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");
}
Serial.println((String)"Connected to " + v[0] + " with IP addres: " + WiFi.localIP().toString() );
Serial.println(SPIFFS.exists("/inputs.txt"));
}
void loop() {}
This works in Arduino IDE. It should work in PlatformIO IDE, but it probably doesn’t because I have Serial.begin(115200);
and the Serial Monitor’s Speed is at 9600.
Thank you !