This one is confusing me quite a bit. I have tested this code before building it up and it worked very well, but I seem now to be getting some issues and I'm not sure why.
I have two Teensy 3.2s; one of them is reading a pulsed signal and converting that into a speed which it then uses to drive a stepper motor. At the same time it also transmits the data across to another Teensy which should receive the speed data and display it on a small OLED display.
Rigging it up, it does work, but in my incoming data stream, SPEED_MPH shows the correct speed some of the time, with lots of zeros in between causing the screen to not work properly.
Can anyone help me understand where these zeros are coming from?
The TX code is "StepperDuino"
RX code is "DashCAN"
DashCAN.ino (39 KB)
StepperDuino.ino (8.71 KB)