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

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

Open
alexkaiserlis opened this issue Mar 23, 2024 · 1 comment

Comments

@alexkaiserlis
Copy link

`#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.

@fanfanlatulipe26
Copy link

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 ....

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

2 participants