Upload the sketch to your chosen board using the Arduino IDE. Then, press the Play button at the top of the Unity window to enter Gameplay mode.

Twist and turn the 9 DoF sensor around and you should see your 3D object spin around the Scene window in unison with the board. 

Going Further

You could map the incoming sensor data to build a controller for a game built in Unity. You could also experiment with different sensors to control objects in different ways. For example, you could use a light sensor to change the lighting of a scene depending on the ambient light in your space. 

This guide was first published on Aug 31, 2022. It was last updated on Aug 31, 2022.

This page (Control the Object with the 9 DoF Sensor) was last updated on Aug 24, 2022.

Text editor powered by tinymce.