I am not an expert of electronics so don't judge me :D.
I recently got an arduino nano which is now connected to a GY-521 gyro/accelerometer. I indeed scanned with the i2cscanner script and the sensor is detected. Whenever I use the basic scripts from the arduino playground I get raw values, which I can actually "read".
Recently, I installed the i2cdevlib since I wanted to try the teapot example. Everything was ok no weird message during compilation and I indeed installed all the libraries for arduino and processing. I do not have any error message during compilation, however, first the plane doesn't move when I move the sensor and if I open the serial monitor i get these no sense values:
In the Processing IDE, the bottom part of the window is the console. You can use print( a_variable); or print("a string"); to print out troublshooting data to the console. Put a print after the serial reception portion to see what is actually going into the Processing program
Ok I changed the serial port to a specific serial port with this line:
String portName = "/dev/tty.wchusbserialfa130";
and then put:
println(portName)
and I get the correct port. If i try to open the serial monitor it say "busy", which should mean that it's being used for the connection with processing. However, no plane moving.
I also tried the reset button in every possible combination with play in processing.
You are right that you can not have serial monitor and processing connected to the serial port at the same time. You can put diagnostic prints in the processing program to try and see if data is coming into the processing serial port. Check where the serial port is set up in setup() of the processing program to make sure the right port and baud rate is set.
Hey guys if you have any problems with the MPU 6050 Please check my tutorial here ! I go through step by step and get the teapot Demo working ! I also have the Dev libraries ready for download!