Home › Forums › Forums › Technical Support for BerryIMU › Basic ioctl stuff
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by Mark Williams.
- AuthorPosts
- March 23, 2016 at 8:29 am #4756spaxwaxParticipant
Very basic question here as I am totally ignorant with most/all coding matters and just copying pasting really,,,
I want to read the data from the sensors on the Berry IMU, Ive enabled the i2c but cant proceed because Ive no idea where to write the code or paste the code you shared on github.
Do I open an application in Raspberry Pi? which one? how do I execute the code?
Thanks
March 23, 2016 at 11:49 am #4757Mark WilliamsKeymasterfrom the terminal on your Raspberry Pi
1. Download the code
git clone https://github.com/mwilliams03/BerryIMU.git
2. CD into one of the folders
python-LSM9DS0-gryo-accel-compass
3. Look at the README file to see what needs to be done to either compile or run the code
cat README
4.To run the Python code in this folder
sudo python berryIMU.py
Mark --OzzMaker.com --
March 23, 2016 at 10:45 pm #4772spaxwaxParticipantThanks Mark
I managed to run berryIMU.py and I see all the angles running as I move the unit
Is there a way to isolate just two readings from the unit?I need only the acceleration, that is the speed of movement, not the angle, when I move the unit in one direction without turning it in any axis
and the change of angle around the Y axis
the goal is to use it as a controller for a 2D game
Thanks for your help
March 23, 2016 at 11:01 pm #4773Mark WilliamsKeymasterHave a look in the python code, there are comments that describe how to do this.
Make sure you have the latest version of code from the git repo. it was updated 2 days ago.Mark --OzzMaker.com --
- AuthorPosts
- You must be logged in to reply to this topic.