I am trying to develop an Underwater ROV system using Nick Gammon’s RS485 library. System consists of 4 BLDC motors for ROV movements( Thrusters) , one servo motor for camera rotation and a LED lighting system controlled by L298N PWM module. I have used pressure , temperature , leak detection and voltage sensors for the ROV. Thrusters are controlled by a PS2 wireless joystick. Camera rotation and brightness of lights controlled by potentiometers. Arduino mega 2560 is used as the master on surface, which is used to send all control signals. Inside of the ROV Arduino uno used as the slave which is receiving data and reading all sensors sending back to the surface.
Everything worked perfectly. Data passing without any distortion from both ends. but when I am not sending any control signals, BLDC motors are rotating two or three rounds and stops. This happens continuously with same time interval.( like 3 seconds). Servo motor and lights are acting same as BLDC motors. How can I stop this?
My code is also attached here.
Master code and Slave code
SSerial_Twoport_M.ino (4.86 KB)
SSerial_Twoport_S.ino (9.63 KB)