Skip to content

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

Open

Description

@alexkaiserlis

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

Activity

  1. fanfanlatulipe26 commented on Aug 8, 2024

    @fanfanlatulipe26

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions