PSI3422_Aula3

Fork of NunchukLib by decarvalho adelino

Files at this revision

API Documentation at this revision

Comitter:
gabrielkim13
Date:
Wed Aug 16 12:37:16 2017 +0000
Parent:
2:0a8f43931041
Commit message:
PSI3422_Aula3

Changed in this revision

Nunchuk.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Nunchuk.cpp	Tue Feb 25 10:50:05 2014 +0000
+++ b/Nunchuk.cpp	Wed Aug 16 12:37:16 2017 +0000
@@ -44,21 +44,26 @@
             datas[i]=decode(datas[i]);
         }
 
-        //
+        /*
         if(datas[0] < 100)
             joyX=-1;
         else if(datas[0] >200)
             joyX=1;
         else
             joyX=0;
-        //
+        */
+        joyX = datas[0];
+        
+        /*
         if(datas[1] <100)
             joyY=-1;
         else if(datas[1] >140)
             joyY=1;
         else
             joyY=0;
-        //
+        */
+        joyY = datas[1];
+        
         accX=datas[2]<<2;
         accY=datas[3]<<2;
         accZ=datas[4]<<2;