Hello everybody, I have a problem with MPU_6050 adresses on UDO. I can take angles with easily from device. But, I need to manage frequency of sampling in order to set some variables. Arudiono-IDE gives the error which is belowing: Code: TWBR = ((F_CPU / 400000L) - 16) / 2; // Set I2C frequency to 400kHz How can I fix this problem? Thank you.
I suppose from your other messages you use the Udoo Neo. This device uses a different I2C wire library than an Arduino Uno. The variable TWBR is not a valid variable in this. The wire library used on the Neo can be found here https://github.com/UDOOboard/arduino-board-package/tree/boardmanager/udoo/solox/libraries/Wire and in your Arduino IDE I took a short look and found the TWI_CLOCK variable but I don't know what valid values are other than the given. Perhaps look into the CPP if there is more information. Also look into the freescale reference manual http://cache.nxp.com/files/32bit/do...ORMAT=pdf&WT_ASSET=Documentation&fileExt=.pdf
Thank you so much waltervl for you have interested in. I have predicted like this problem. This device so unique I will look wire libraries and freescale reference manual. Also, I will try that TWI_CLOCK command in order to get sampling frequency..
I saw later there is also a set clock function in the udoo neo wire library so perhaps that will do the trick.
No problem thank you very much again I use that MPU6050 which it is external 6 axis sensor. But I sometimes take angles from UDOO NEO. I consider that commands for greater project than prototype. I have a problem with UDOO now, I am thinking this problem about sampling time. So, I am trying that with Arduino Nano. If I fix this problem, I consider sampling time of UDOO again