Using a Parallex 360° with Arduino

Hello,

you have problem on your code.

errorAngle = targetAngle - angle; // Calculate error

  • 'errorAngle' does not name a type

your code looks complicated, with a if else comand without {}.