Il giorno mercoledì 8 novembre 2017 19:50:17 UTC+1, Björn Lundin ha scritto:
> Den 2017-11-06 kl. 12:14, skrev Tony van der Hoff:
>
> >>
> >> I've not used this device, but in emails with others what I gather is that
> >> you need to make sure it's not in self-test mode and that the registers
> >> (scaling, etc.) are set correcty, and that it's not in sleep mode, then
> >> trigger it to take a sample. Until then, the default values are all zeros.
> >>
> >> Or put it into continuous sample mode.
> >>
> >> So go and read the fine manual before writing it off!
> >>
> >> -Gordon
> >>
> >
> > You have to send it a wake-up signal. Write a 0 to register 0x6b.
> >
> > See
> >
http://blog.bitify.co.uk/2013/11/reading-data-from-mpu-6050-on-raspberry.html
> > for a python program
> >
the program in the page doesn't initialize the device.
It's normal that it returns zeros.
Check here, the initialize function:
https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.cpp
Bye Jack
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|