STM32F4 Discovery

L3GD20 3-axis digital gyroscope example 10

Library 28- L3GD20 3-axis digital gyroscope

MEMS sensor L3GD20 is included on STM32F429-Discovery board, so I made a library to use it. This is 3-axis digital gyroscope, so it can measure rotation in X, Y and Z axis. L3GD20 sensor works with SPI communication, or I2C. On Discovery board is connected for SPI mode, SPI5 is used for communication. L3GD20 can be set to work in 3 different full scales: 250, 500 and 2000 dps. Sensor has also possibility to measure temperature, but this is not...

gps-featured 46

Library 27- Read GPS data on STM32F4 devices

Recently I got a cheap GPS module from ebay, NEO-6M. They said that this is flight controller, but position fix is good only on really flat area. When I made a library, I’ve connected my SDcard to STM32F4 to save data, result are here. To communicate with STM32F4 device, USART is in use. Most GPS modules have by default 9600 baudrate and 1Hz¬†refresh rate of sending data. I got my GPS configured in 115200 baudrate and 5Hz refresh rate, so...

Library 26- Rotary encoder on STM32F4 34

Library 26- Rotary encoder on STM32F4

A rotary encoder, also called a shaft encoder is an electro-mechanical device than converts the angular position or motion of a shaft to an analog or digital. There are 2 types of rotary encoders: Incremental – output indicates just rotation clockwise or counterclockwise Absolute – output indicates current position for encoder For that purpose I made a one simple library. This library works for incremental rotary encoders. It uses an interrupt to handle rotations. On the rotary encoders inside are...

STM32F4 External interrupts tutorial 123

STM32F4 External interrupts tutorial

Each STM32F4 device has 23 external interrupt or event sources. They are split into 2 sections. First interrupt section is for external pins (P0 to P15) on each port, and other section is for other events, like RTC interrupt, Ethernet interrupt, USB interrupt and so on. October 1, 2014: Added external interrupts library. GPIO as Interrupt Interrupt lines I will show now how to configure GPIO pin to be an interrupt and how to handle it in your code with...

AM2301 Temperature and Humidity sensor 18

Library 25- AM2301 (DHT21) sensor for STM32F4

AM2301 or DHT21 is a digital sensor for measure temperature and humidity. It has temperature resolusion up to .1 degree and accuracy to .5 degree celcius. Humidity has .1% resolution and 3% accuracy. This is quite good. Library Features Read temperature from sensor Read humidity from sensor Dependencies CMSIS STM32F4xx STM32F4xx RCC STM32F4xx GPIO TM TM DELAY TM GPIO defines.h

Library 24- Virtual COM Port (VCP) for STM32F4 480

Library 24- Virtual COM Port (VCP) for STM32F4

This library provides Virtual COM port on USB OTG. This means, that you don’t need external USB->UART converter (like FTDI) to communicate with computer. STM32F4xx will be seen to computer like COM port. Library can be used on all STM32F4xx devices. It has also features to support STM32F4- and STM32F429 Discovery boards. To use USB with HAL, check my HAL USB library. Library Features Enables USB VCP Works in USB FS mode Default for STM32F4-Discovery board Works in USB HS...