Monday, March 24, 2014

Reading L3G4200D Gyro sensor via I2C using Stellaris launchPad – PART 1

I got a stellaris LM4F120 launchPad hanging around for sometime. I haven’t done much with that other than trying FreeRTOS on it. Recently I got a cheap L3G4200D from ebay. I read the raw values(XYZ axis angular rate) from it via I2C using the stellaris.

I haven’t yet figured out how to convert it to real angles. In second part I will create a 3D WPF app to display a 3D axis view.

Sensor module i got from ebay have L3G4200D,ADXL345,HMC5883L,BMP085 sensors and its cheap.

Sensor modules I2C SCL & SDA pins are connected to  GPIO pins 6 & 7 ie, PA6 (I2C1SCL), PA7(I2C1SDA) of stellaris 
Value is send to the PC using UART0 which is  connected to the stellaris virtual port which will appear on PC.

Checkout the code in github

Here is the screenshot of raw values received in PC


User manual

Stellaris LM4F120 LaunchPad Evaluation Board Software

Getting Started with the Stellaris EK-LM4F120XL LaunchPad Workshop (Videos & Articles)

Creating a new project 

Blinking LED

Some other tutorials 

Stellaris Launchpad for Beginners

Some code I referred

Online Stores to purchase Texas Instruments products

No comments: