Hi, I try to move two cube by two IMUs (mpu9250) that I control with an arduino mega. I send the euler angles from arduino to Unity by the serial communication and with the videos of Kapil Goswami in youtube I manage to move one cube with 1 IMU. Now I want to move two different objects with two IMUs but I do not know how I can do. I try to replicate the code that I used for the first object for the second cube but I obtain the error: “IOException: Access denied” because I try to open two times the serial port. I add the code that I udes for one cube. I think I have to control the two objects with the same script but how i can do it? Can someone tell me how I can control different object by the same serial port?
Thanks so much:)
Yes, I send the euler angles of the two IMUs from the same arduino script but I do not know how I can move the second object. If I create a second object and write a new script for the second object where I read the data from the second IMU I have got the previous error because I try to read two times the same serial port…