I have an Arduino Uno connected to a Rasperry Pi via a USB cable and as I turn a rotary encoder on the Arduino the position of the encoder ( 0 to 79) is being sent to the Raspberry Pi.
As the encoder is rotated one of 80 neo pixels leds connected to the Arduino light up corresponding to the position of the encoder.
A script running on the Pi opens up a terminal window and the positions are being printed and correspond to those in the serial window on the Arduino.
Depending on the position I want a certain thing to happen in the Python script such as playing a music file.
Nothing happens in my script and the number being printed is because I am led to believe that the data being received by the Pi is a character and not an integer?
Can someone please explain why the data sent or received is not an actual number and how can I can convert the data so that the Pi can respond ?
I did read somewhere that the numerical character has to be converted into a numerical number by using -0 ?
But as a beginner I have code flying over the top of my head ?