# How to read multiple sensors in Processing using Arduino I2C

**URL:** <https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [June 19, 2021, 6:48pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799 "2021-06-19T18:48:53Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 22, 2021, 1:46pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/23 "2021-06-22T13:46:15Z")

</div>

Hello,

Some articles of interest:

- [The importance of IMU Motion Sensors - CEVA’s Experts blog](https://www.ceva-dsp.com/ourblog/what-is-an-imu-sensor/)
- [https://www.analog.com/en/analog-dialogue/articles/3d-sensors-in-intuitive-game-design.html#](https://www.analog.com/en/analog-dialogue/articles/3d-sensors-in-intuitive-game-design.html#)
- [https://www.researchgate.net/post/How\_can\_I\_calculate\_displacement\_from\_accelerometer\_data](https://www.researchgate.net/post/How_can_I_calculate_displacement_from_accelerometer_data)
- [arduino - what is the algorithm to get position (Linear displacement and linear velocity ) using IMU (Like MPU6050)? - Robotics Stack Exchange](https://robotics.stackexchange.com/questions/16757/what-is-the-algorithm-to-get-position-linear-displacement-and-linear-velocity)

I am sure there are many more links on this topic.

I have asked the same questions!

I have worked with the “buggy” BNO055 and other IMUs.  
_[https://www.youtube.com/watch?v=6dVMDsV1SEo](https://www.youtube.com/watch?v=6dVMDsV1SEo)_

`:)`

---

<div class="post-metadata">

**Author:** ![Halfrican911](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Post date:** [June 22, 2021, 2:31pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/24 "2021-06-22T14:31:07Z")

</div>

Thanks I’ll look into that

---

<div class="post-metadata">

**Author:** ![Halfrican911](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Post date:** [June 22, 2021, 3:48pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/25 "2021-06-22T15:48:18Z")

</div>

Everything on those pages explain what it is but I’m mainly looking for the coding on how to put it in processing I have the acc xyz and the time and the gyro xyz plus magnetic xyz in arduino. I have full rotation on my processing with the roll pitch and yaw from angular attitude but I want to add velocity and position to my processing code. Also I read on the gaming page that the wii controllers counter the error of velocity and position by adding regular resets so I need to put that in also but I’m unsure on the coding side I think I know a little but I need more info I’ve looked on alot of stuff and have some code but I’ve gotta work it into my code for the sensor I have coded.

---

<div class="post-metadata">

**Author:** ![HackinHarry](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Post date:** [July 8, 2021, 12:26am UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/26 "2021-07-08T00:26:42Z")

</div>

I’ve worked with the BNO055. I also have a multiwii that uses an MPU6050. The multiwii does what it sounds like Halfrican911 wants to do. The multiwii project had a lot of contributors and did a good job.

---

<div class="post-metadata">

**Author:** ![Halfrican911](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Post date:** [July 8, 2021, 10:22am UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/27 "2021-07-08T10:22:01Z")

</div>

Yea I ended up moving to blender in processing I did make 2 blocks that tracked perfectly I just couldn’t figure out the rest um using mpu 9250 just a high precision data algorithms

---

<div class="post-metadata">

**Author:** ![Halfrican911](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Post date:** [July 8, 2021, 5:49pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/28 "2021-07-08T17:49:46Z")

</div>

I also figured out that it’s dead reckoning I need using the accelerometer and quaternions to calculate “position” in a virtual space assuming that when you stop you are at rest and a new point

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 11, 2021, 10:31am UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/29 "2021-07-11T10:31:10Z")

</div>

Hello,

There is some good stuff here that may be of interest:  
[EuclideanSpace - Mathematics and Computing](https://www.euclideanspace.com/)

> This site looks at mathematics and how it can be computed.

`:)`

---

<div class="post-metadata">

**Author:** ![Halfrican911](https://avatars.discourse-cdn.com/v4/letter/h/9fc348/32.png) [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Post date:** [July 12, 2021, 6:05pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799/30 "2021-07-12T18:05:26Z")

</div>

Yea thats a really awesome site but my main thing now is taking the data and making it rotate around a parented sensor I tried to use processing but It just alot I turned to blender but I’m having all the same issues

[Previous page](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799.md?page=1)
