• How are you saving this code to Espruino? If you're uploading to RAM and then doing save() then the Serial1.setup code might not run at boot time, which I guess is possibly what is causing the problem?

    Saving to flash should work fine, but I would try removing the Attempt to clear the serial buffer before main code starts. code as I'm not sure it'll be doing anything and worst case could end up locking up the device if data comes in faster than can be handled.

  • I always use the "save to flash".
    And before every upload I run "require("Storage").eraseAll();reset()" to clear the board.

    The reason I run "require("Storage").eraseAll();reset()" before every upload is that uploads have a tendency to fail half way if not. I am guessing the BLE update instruction running every 2s might interrupt the BLE transfers??

    I removed the "Attempt to clear" section and re did the same tests. No change, still cant have the RX pin connected.

    Just to point out. The status of the TX pin on the ESP32 will be unknown if it's transmitting data. During a cold power on this is most likely the case.

About

Avatar for Gordon @Gordon started