Setup:
- ESP8266: board description (sorry it's in Japanese)
- Pololu A-Star 32U4 Micro: board description
- Communication over software serial, library EspSoftwareSerial, baud rate 9600
- Sender: pololu, Receiver: ESP
Problem description
The bits sent out by Pololu to ESP get scrambled now and then, but not all the time.
As an example, when Pololu sends decimal 48
, ESP receives either 152
or 176
for those instances when the bits get scrambled. Binary representation:
48
= 0 0 1 1 0 0 0 0
: correct
152
= 1 0 0 1 1 0 0 0
: incorrect
176
= 1 0 1 1 0 0 0 0
: incorrect
Since the bits get scrambled, I'd expect the ESP to receive random combinations of 0's and 1's. But incorrect data always being either 152
or 176
makes me think there's a pattern I'm not seeing. And it's that pattern which if I can spot will give me an idea of how to solve this issue.
Additional context: Pololu actuates a few motors (of course via motor drivers) and sends a 48
as a SUCCESS
signal to indicate motor operation has completed successfully. So it's not so much streaming of data but more of an "event-based" transmission. For the times when 48
is incorrectly received as 152
or 176
, the motors still actuate as expected.
I'm looking for some thoughts and suggestions on how to go about finding the cause of this issue. If necessary information is missing please mention in the comments and I'll add more details.