-
• #2
@user72031 You could have a look at this thread http://forum.espruino.com/conversations/297915/
-
• #3
Thanks! ... Sadly...I still don't get it, should I just ..
var r = Puck.mag();
var angleToTheNorth = getheading(r.x,r.y,r.x);seems not like this ?
-
• #4
I have just updated a thread where I was asking the same question http://forum.espruino.com/comments/13395796/
That will show you how to get the approximate readings (0 is North, -90 is West, 90 is East and 180 is South), so you will be able to use them in the rest of your code. I'd be interested to see it posted, good luck!
-
• #5
See if this helps
http://forum.espruino.com/conversations/297915/#comment13395903
Hi all!
I want to make a volume control by rotation the Puckjs.
basically I want to get the angle value change once use press and rotate the Puck,
if the value large than a preset value, I call a volume up and then
reset and wait for another value pass.. I also need to know every time user rotate left or right..
I got xyz from the magnet sensor but I am not sure what to do next.
I did some search on the sin cos tan.. its quite complicate for me..
any hints ? thanks!!!