Monthly Archive: August 2014

Library 31- USB HID Host for STM32F4 77

Library 31- USB HID Host for STM32F4

USB HID (or Human Input Device) is a library, that allows you to read mouse or keyboard data with your STM32F4xx device. So you can use keyboard to write characters to STM32F4xx or use mouse for LCD or any other stuff. Library Features Interface with USB mouse 3 buttons and movement supported Interface with USB keyboard QWERTY or AZERTY supported

HC-SR04 sensor on STM32F4xx device 26

Library 30- Measure distance with HC-SR04 and STM32F4

I have at least 10 HC-SR04 sensors at home so I decided to made a library for it. This sensor can measure distance between 2cm and 4meters. It can produce about 40 measurements per second. His working angle is about 15degrees, On the start, you have to send 10us starting pulse at TRIGGER pin. After that, on ECHO pin high pulse is returned in relation to the distance. Large distance means large high signal. You have to give sensor some time...

USB Flash drive on STM32F4 96

Library 29- USB MSC HOST for USB flash drive on STM32F4

Recently I made a library to read SD cards with FatFs by Chan. Today, I made a new library for USB MSC Host and connect both libraries together, so you can operate with USB flash drives and SD cards simultaneously with STM32F4xx device. USB MSC Host library is a separate library, to handle and do stuff with USB stack. You will also need my FatFS library for SD cards. I will go here step by step, how to configure this...

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 32

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 30

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...