APC220 error

Hello there. I seem to be having a problem that nobody has had/talks about. Which likely means it’s something super simple. I have set up a simple code that reads and prints a mapped value from a potentiometer. This value reads properly through RF magic onto my pc. Another arduino with the other APC220 then is supposed to read that value and write it to a servo. Instead, even if I only have the lines for reading the serial communication and printing it to the monitor, it reads tons of erroneous values. With nothing connected to the input serial, the serial monitor reads -1 consistently. Then if it’s reconnected and should read between 0-180, it reads any positive number you can think of. Placing the transmitter in the pc doesn’t change that.

Are you checking that Serial.available() is >0 before you read in data?

Yes, with or without Serial.available() checked, it provides the same random numbers. When it’s reading all -1, you can send numbers to it and they don’t come across properly. Ex. If you send “180” you may get two or three readings in the 40’s in a row.

Post your code, using code tags. See "How to use this forum" for instructions.

When it's reading all -1

"-1" means that no characters were/are available. You might find Serial Communications Basics helpful.