Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: robocon2017mbed_contoroler_L2
Fork of MyLib by
Diff: Nunchuck/Nunchuck.h
- Revision:
- 11:08d8bd103eda
- Parent:
- 7:15e3890a6782
- Child:
- 12:479a1f294781
diff -r d0b1160ee5c2 -r 08d8bd103eda Nunchuck/Nunchuck.h
--- a/Nunchuck/Nunchuck.h Thu May 11 12:55:05 2017 +0000
+++ b/Nunchuck/Nunchuck.h Fri Oct 13 09:35:30 2017 +0000
@@ -5,7 +5,7 @@
#include "mbed.h"
#define NUNCHUCK_ANALOGDATA 1 //1 : analog 0 : degital
-#define NUNCHUCK_DEADZONE 6 //analog stick's deadzone
+#define NUNCHUCK_DEADZONE 0 //analog stick's deadzone
#define NUNCHUCK_ADDR 0xA4 // 0x52 << 1
#define PI 3.14159265358979
@@ -25,11 +25,11 @@
int accz ();
bool buttonc();
bool buttonz();
-
+ bool init();
+
private:
Timer timer;
bool flag;
- bool init();
char data[6];
void getdata();
};
