I can upload my code just fine, but I don’t get any communication back on the serial port. The diodes blink like they should (see code below).
What I’ve tried:
- 9600 and 115200 baud rates (yes both in platform.ini and in the code)
- setting monitor_rts and monitor_dtr to all combinations of 0 and 1
What could be going wrong?
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
upload_protocol = esptool
monitor_speed = 115200
lib_deps =
https://github.com/olkal/HX711_ADC.git
ESP_EEPROM
khoih-prog/ESP_WiFiManager@^1.3.0
lib_extra_dirs =
/home/bjorn/platformiocode/AJ-PIO/
/home/bjorn/platformiocode/AJ-PIO/include/
void setup() {
// Set up serial output to PC
Serial.begin(115200);
delay(1000);
Serial.println("\nSetting up");
// Set up pins
pinMode(BUTTON_PIN, INPUT);
pinMode(GREEN_LED_PIN, OUTPUT);
pinMode(RED_LED_PIN, OUTPUT);
// Blink LEDs
for( int i = 0; i < 5; i++){
analogWrite(GREEN_LED_PIN, 1023);
analogWrite(RED_LED_PIN, 1023);
delay(1000);
// Turn LEDs off
analogWrite(GREEN_LED_PIN, 0);
analogWrite(RED_LED_PIN, 0);
delay(200);
Serial.println(i);
}
return;
}