IBusBM icon indicating copy to clipboard operation
IBusBM copied to clipboard

A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption. on ESP32

Open alexkaiserlis opened this issue 2 years ago • 1 comments

`#include <IBusBM.h>

// Create iBus Object IBusBM ibus;

// Read the number of a given channel and convert to the range provided. // If the channel is off, return the default value int readChannel(byte channelInput, int minLimit, int maxLimit, int defaultValue) { uint16_t ch = ibus.readChannel(channelInput); if (ch < 100) return defaultValue; return map(ch, 1000, 2000, minLimit, maxLimit); }

// Read the channel and return a boolean value bool readSwitch(byte channelInput, bool defaultValue) { int intDefaultValue = (defaultValue) ? 100 : 0; int ch = readChannel(channelInput, 0, 100, intDefaultValue); return (ch > 50); }

void setup() { Serial.begin(115200); Serial2.begin(115200); ibus.begin(Serial2); }`

I use it on an esp32 based board (Waveshare General Driver for Robots) using esp32 Dev Module on Arduino IDE. and i get the following errror on compilation. A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption. Failed uploading: uploading error: exit status 2

I connected the pins as instruxted.

alexkaiserlis avatar Mar 23 '24 19:03 alexkaiserlis

DOn't you think that this issue is not linked to the IBusBM  library but is only an upload problem that mat occur with any sketch.

Maybe you could close this issue ....

fanfanlatulipe26 avatar Aug 08 '24 07:08 fanfanlatulipe26