Hi,
I'm an Electronics/Arduino/JeeNode newbie and started with the regular tutorials and got my LEDs blinking in many different configurations quickly, jeeee ;-)
Now I decide to go for the next step,.. get my gravity plug working. I have been trying for two days now but no sign from my gravity plug. I understand I2C is simple, it seems not for me. What am I doing wrong?
Sofar, I have installed the libraries Ports and RF12, I run a JeeNode USB with the demo sketch:
#include
#include // needed to avoid a linker error :(
PortI2C myBus (1);
GravityPlug sensor (myBus);
void setup () {
Serial.begin(57600);
Serial.println("\ngravitydemo;
sensor.begin();
}
void loop () {
const int p = sensor.getAxes();
Serial.print("GRAV ");
Serial.print(p0;
Serial.print(' ');
Serial.print(p1;
Serial.print(' ');
Serial.println(p2;
delay(1000);
}
From my serial port I get this
[gravitydemo]
GRAV -1 -1 -1
GRAV -1 -1 -1
GRAV -1 -1 -1
etc...
I tried many different configurations but still nothing worked.
Anyone who could tell me how to wire my plug to the JeeNode or I'm missing something?
Thanks!
Rik