Gyroscope L3G4200D

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times
Contact:

Gyroscope L3G4200D

Post by hypamat »

hey guys,
sorry to keep asking questions, but I'm a bit of a "newbie" i am trying to get the gyroscope to work, but i can't get it to read it properly in the simulation. i have got the gyroscope and a LCD screen on the components window, and i just want to read the Y axis for now, but all it shows is zero, even if i adjust the inputs in the simulation. Along with this not working, it concerned me that it only showed a whole number, not (for example) 27.6 is there a way to do this, too?

thanks for your help,
Matt

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Gyroscope L3G4200D

Post by kersing »

It helps if you post your program source so we can take a look and try to find what is wrong with it. Now there is not a lot to go on...

(To attach a flow code file, choose the 'Upload attachment' TAB below the 'Save', 'Preview' and 'Submit' buttons. Browse to the file and click on 'Add the file')
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times
Contact:

Re: Gyroscope L3G4200D

Post by hypamat »

ah, that would help! I've attached my fcfx file now, please let me know what you think :)

thanks!
Attachments
Gyroscope.fcfx
(5.27 KiB) Downloaded 367 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Gyroscope L3G4200D

Post by medelec35 »

Hi Matt,
Just before GetY(), Try placing A Gyroscope SampleDevice().

Also don't forget, before compiling to hex you will need a Gyroscope Initialise at the start of main.

Martin
Martin

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times
Contact:

Re: Gyroscope L3G4200D

Post by hypamat »

brilliant! simple if you know how, eh?

thanks again, working perfectly now :)

matt

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Gyroscope L3G4200D

Post by medelec35 »

you're welcome Matt,
Glad its working now.
Thanks for letting us know.

Martin
Martin

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times
Contact:

Re: Gyroscope L3G4200D

Post by hypamat »

Just to close this topic, i have finished my flow code file and would like to share it as a example for others reading :) it checks to make sure the communication to the device is working properly, and then gives you a x, y and z reading from the sensor and displays that on a LCD screen, useful to build on :)

Thanks again,
matt
Attachments
Gyroscope.fcfx
(10.19 KiB) Downloaded 384 times

George_B
Posts: 128
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 51 times
Been thanked: 19 times
Contact:

Re: Gyroscope L3G4200D

Post by George_B »

Hello, I was trying to communicate with a gyro module MPU-6050 but i was unable to do so. I think the two versions have a different controlled technique?


Any idea of how i can get some data out of this module?

http://www.ebay.co.uk/itm/MPU-6050-Modu ... 2315263503


EDIT: I found this topic after some search that did not came up with the first shot. Here it is

Thanks
George

Post Reply