Hi all,
I’m having issues with getting sketches to upload and run correctly using PlatformIO. The hardware I’m using is Heltec Cubecell (asrmicro650x)
The code would build fine, without errors. Upload would indicate success and I can verify that the old firmware on my board really does get deleted (Blink code I uploaded with Arduino IDE stops blinking the LED)
But after PlatformIO upload, the device does not get past bootloader. Not sure if the problem is with PlatformIO or with Heltec support for asrmicro650x
void setup()
{
// initialize LED digital pin as an output.
pinMode(RGB, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(RGB, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(RGB, LOW);
// wait for a second
delay(1000);
}
I don’t know this device at all, so please bear with me.
I’m assuming exacttly the same code works with the Arduino IDE and that thete are no changes except #include "Arduino.h".
I’m assuming that RGB is predefined simewhere in the code or toolchain/platform.
The compilation is working and apparently uploading, so I would think that PlatformIO is working.
Looking at the web for the device shows the developers mentioning bugs in the PlatformIO support back in June 2020. I would hope these are fixed now, but can’t be sure.
Maybe there is a bug in the compiler or supportlibraries. Unlikely, I admit.
Maybe the code uploaded is missing something that the Arduino IDE is doing? Not turning on interrupts? Not correctly defining pins? Difficult to track down though.
Might I suggest raising a support call with the board/firnware maintainers regarding the problem – given that the code compiles and uploads.
I’ve raised the issue on the manufacturer forums as well. But without much feedback so far. I posted on this forum in hopes that maybe it would be a known “rookie mistake” I’ve made somewhere.
You are correct in that the same code works fine when compiled and uploaded using Arduino IDE.
All in all, thank you again for offering your thoughts on the matter. Now I’m more confident that I need to look at the board/library for the culprit
What does the back of your board say? Mine is a CubeCell Board (AB-01) and when I choose that in the board selector, I get board = cubecell_board and not cubecell_node.
But that doesn’t seem to change a lot regarding the behavior. No RGB blinking.
But I do get normal serial output after putting in Serial.begin() and Serial.println() --> The pinout seems wrong. Let me check that.
Well, there you go! @maxgerhardt you are a hero! It was indeed a rookie mistake. I must have used some other means of creating the project. Because now when I started a fresh new project via PlatformIO start page and selected my hardware, it works correctly.