Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile and upload to Arduino Opta is succesfull, but code doesn't run #763

Open
soosp opened this issue Mar 26, 2024 · 0 comments
Open

Comments

@soosp
Copy link

soosp commented Mar 26, 2024

This simple code has been compiled and uploaded from PlatformIO 6.1.14 (VSCode 1.87.2 on Windows 11) to an Arduino OPTA RS-485, but it doesn't run.
It prints nothing and the LED is dark.

#include <Arduino.h>

#ifndef MONITOR_SPEED
  #define MONITOR_SPEED 9600
#endif


#include <Arduino.h>

#define LED LED_BUILTIN

void setup() {
    pinMode(LED, OUTPUT);
    Serial.begin(MONITOR_SPEED);
    while(!Serial);
    Serial.println("Starting...");
}

void loop() {
    digitalWrite(LED, LOW);
    delay(1000);
    Serial.println("Low");
    delay(1000);
    digitalWrite(LED, HIGH);
    Serial.println("High");
    delay(1000);
}

platformio.ini is here:

[env:opta]
platform = ststm32
board = opta
framework = arduino
monitor_speed = 115200
build_flags =
    -DMONITOR_SPEED=${this.monitor_speed}

If you try to compile and upload it from Arduino IDE 2.3.2, it works well (prints to the serial console and LED is blinks).

I have had similar experiences with other sketches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant