Difference between revisions of "How to interface ST L3GD20 gyroscope with the VisionSOM-6ULL"
From SomLabs Wiki
(Created page with "{{PageHeader|How to interface ST L3GD20 gyroscope with the VisionSOM-6ULL}} == Description == [https://kamami.pl/kamod-kamami/557724-kamodl3gd20-modul-zyroskopu-mems-z-ukladem...") |
|||
Line 19: | Line 19: | ||
== Hardware set-up == | == Hardware set-up == | ||
− | |||
− | |||
− | |||
− | |||
Connect the KAmodL3GD20 module according to the photo below: | Connect the KAmodL3GD20 module according to the photo below: | ||
Line 28: | Line 24: | ||
== Reading the values == | == Reading the values == | ||
+ | To run the gyroscope, you need to go to the directory where the example code is located. | ||
+ | root@localhost:~# cd /root/linux-academy/2-8 | ||
− | + | Now, it's time to run the application. The readings of three axis values from L3HGD20 chip will be displayed after executing: | |
− | |||
− | |||
− | |||
− | + | root@localhost:~/linux-academy/2-8# ./gyro-i2c | |
+ | Any move of the sensor board will be related with the readings changes: | ||
− | + | ||
− | + | [[File:VisionCB_KAmodL3GD20_03.JPG|center|800px]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[File: |
Revision as of 22:19, 26 July 2018
How to interface ST L3GD20 gyroscope with the VisionSOM-6ULL
Description
KAmodL3GD20 is a gyroscope module with a L3GD20 chip from STMicroelectronics. It allows to measure angular velocity at ±2000 degrees per second.
Prerequisites
This tutorial is based on a pre-prepared image for VisionSOM-6ULL module. The image is available here: SoMLabs-VisionSOM-6ULL-training-02-2018-sdcard-2gb.zip.
Then you need to write the image file to microSD card. More information you can find in manuals: How to prepare SD Card with Debian 9.2 for VisionSOM-6ULL on Linux or How to prepare SD Card with Debian 9.2 for VisionSOM-6ULL on Windows. Please remember to use a proper image file: SoMLabs-VisionSOM-6ULL-training-02-2018-sdcard-2gb.zip.
In the ready-to-use OS image, the kernel driver for the gyroscope has already been enabled in the kernel config, and the device has been added to the devicetree. |
If you need more information about how to customize, build and upload Device Tree file, please visit How to customize Debian 9.2 device tree.
Hardware set-up
Connect the KAmodL3GD20 module according to the photo below:
Reading the values
To run the gyroscope, you need to go to the directory where the example code is located.
root@localhost:~# cd /root/linux-academy/2-8
Now, it's time to run the application. The readings of three axis values from L3HGD20 chip will be displayed after executing:
root@localhost:~/linux-academy/2-8# ./gyro-i2c
Any move of the sensor board will be related with the readings changes: