ardunino pulseIn and Serial1.parseInt(); They dont play nice

I built a self balancing robot and now is time to RC it...

Using pulse In makes a mess, the self balancing routine is going noisy, and all I get in the steppers is jitter.

I am getting the IMU data by serial from another Arduino.

I am using here the MEga

Please help,

Mega_RX_Code_Servo_10_ino.ino (4.25 KB)

So, quit using parseInt(). Send properly delimited data. Save it in an array until the delimiter arrives, then use atoi(), atol(), or strtoul() to convert the array contents ti an int, long, or unsigned long.