I would like to control a dc motor (cheap toy kind) remotely. The motor is connected to an arduino with a motor shield. Another arduino has a pot. I have connected the two ardiunos with NRF24L01 modules and can send messages back and forth. Not sure what the best thing to send is however. Seems strange to send a string with the value read from the pot but I can do that if there is not a better way.
Just send a binary value (1 or 2 byte integer), rather than a string.
You are correct, even if you just wanted to send the value from the pot, it makes no sense to turn it into a string, transmit the string, and parse it back into an integer on the other end. Instead you might consider dividing the value by 4 so it fits into a single byte and then transmitting that byte. Now in the space of one character you have sent the whole number and there is no need to parse the value on the other side.
Check out the difference between the Serial.print and Serial.write functions to see this difference over the debugging terminal.
Great! Thanks for the ideas!