thats my code:
#include <math.h>
void setup() {
Serial.begin(9600);
}
int xpos, ypos;
void loop() {
xpos = analogRead(4);
ypos = analogRead(5);
Serial.println(atan2(xpos, ypos));
}
simple as that... and I know that its in radians.
I can just do: degrees = radians * 180 / PI;
should it work?
Arad.