Gyroscope GY_521 linked to processing

hi all,
i used the code for both Arduino and processing from the link below.

i am using GY_521 module and tried to see the data on processing. although i can read data on the serial montor i see alot of worries as below.
the problem kicks in when i use processing, when i hit run a big gray window open but thing else and an error shown on the console says

arduino worrings :

C:\Users\sysadmin\Desktop\gy_521_send_serial\gy_521_send_serial.ino:156:0: warning: "MPU6050_AUX_VDDIO" redefined
 #define MPU6050_AUX_VDDIO MPU6050_D7  // I2C high: 1=VDD, 0=VLOGIC
 
C:\Users\sysadmin\Desktop\gy_521_send_serial\gy_521_send_serial.ino:51:0: note: this is the location of the previous definition
 #define MPU6050_AUX_VDDIO          0x01   // R/W
 
C:\Users\sysadmin\Desktop\gy_521_send_serial\gy_521_send_serial.ino:560:0: warning: "MPU6050_FIFO_EN" redefined
 #define MPU6050_FIFO_EN        MPU6050_D6
 
C:\Users\sysadmin\Desktop\gy_521_send_serial\gy_521_send_serial.ino:62:0: note: this is the location of the previous definition
 #define MPU6050_FIFO_EN            0x23   // R/W
 
C:\Users\sysadmin\Desktop\gy_521_send_serial\gy_521_send_serial.ino:635:1: warning: 'typedef' was ignored in this declaration
 typedef union accel_t_gyro_union
 ^~~~~~~
Sketch uses 8184 bytes (25%) of program storage space. Maximum is 32256 bytes.
Global variables use 456 bytes (22%) of dynamic memory, leaving 1592 bytes for local variables. Maximum is 2048 bytes.

processing error:

OpenGL error 1280 at bot beginDraw(): invalid enumerant
ArrayIndexOutOfBoundsException: 1

this line is highlighted when the error pops up
String portName = Serial.list()[portIndex];

thank you all

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.