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_control_R
Fork of MyLib by
Diff: Nunchuck/Nunchuck.cpp
- Revision:
- 4:ae9dc8d5c37e
- Parent:
- 3:e7a900958f54
- Child:
- 5:69e9c81e9490
--- a/Nunchuck/Nunchuck.cpp Thu May 11 07:31:39 2017 +0000
+++ b/Nunchuck/Nunchuck.cpp Thu May 11 07:34:44 2017 +0000
@@ -27,10 +27,10 @@
if(flag) {
const unsigned char cmd[] = {0x00};
- if (I2C::write(ADDR, (const char*)cmd, sizeof(cmd)) == 0)
+ if (I2C::write(NUNCHUCK_ADDR, (const char*)cmd, sizeof(cmd)) == 0)
{
wait(0.01);
- if (I2C::read(ADDR, data, sizeof(data)) == 0)
+ if (I2C::read(NUNCHUCK_ADDR, data, sizeof(data)) == 0)
{
for(int i = 0; i < 6; ++i)
data[i] = (data[i] ^ 0x17) + 0x17;
