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.cpp
- Revision:
- 7:15e3890a6782
- Parent:
- 5:69e9c81e9490
- Child:
- 9:1c0640c61fce
--- a/Nunchuck/Nunchuck.cpp Thu May 11 07:48:52 2017 +0000
+++ b/Nunchuck/Nunchuck.cpp Thu May 11 10:38:46 2017 +0000
@@ -99,6 +99,14 @@
}
+double Nunchuck::analogrange()
+{
+ double x = analogx();
+ double y = analogy();
+ return sqrt((x*x + y*y));
+}
+
+
int Nunchuck::accx()
{
getdata();
