I’m a beginner with Arduino and I’m in need of help.
I have a program that sends data to the Arduino’s serial port (azimuth and elevation) of a given satellite.
I made a code for satellite tracking where I use a Mega board with the HCM5883 sensor, a nextion display and relays.
The idea is to compare the data of the sensor with the received through the serial port and thus, to turn on or off relays that drive two motors that move the antenna.
My problem is that while the program is sending the data to the serial port, I can not but read the sensor data.
I noticed on the Mega board that when the data was received by the serial, the TX LED blinks every second while the RX LED, which used to sting rapidly, practically stopped. It flashes approximately every 15 seconds. If you stop sending the data by serial, the RX led returns to normal.
Sorry for my English.
Can someone help me?