There are 2 (currently) projects in stm32f4-bluenrg that can be run on 32F401CDiscovery boards.
A sensor demo project for STM32F401 Discovery board in conjunction with a BlueNRG module.
The BlueNRG app allows you to access the sensor data directly from the mobile device over Bluetooth Low Energy.
The STM32F401 Discovery creates a GATT (Generic Attribute Profile) vendor characteristic, and several services including the one reporting Accelerometer data. The mobile phone (BlueNRG app) connecting the board, aquires Accelerometer data, and visualizes it with a 3D cube.
This projects shows the usages of the Audio DAC CS43L22 and ST MEMS microphone MP45DT02. User can switch between to play or record an audio by pressing USER button.
- Play an audio. Device CS43L22 By default, it plays “audio.wav” that is on the USB Mass Storage (LED6 toggle). A click on the board pauses the audio playing(LED6 on ).
- Record and play an audio. Device MP45DT02 After the USER button is pressed, it starts recording in the USB Mass Storage (LED3 toggle). When the recorded wave length is around 30 seconds or interrupted by pressing the USER button.
Two devices are needed:
- 32F401CDiscovery
- The BlueNRG module (daughter board of STEVAL-IDB002V1)
The connection between F401CDiscovery and BlueNRG board is 5-wire SPI, which is a standard 4-wire SPI with an additional IRQ pin. The IRQ pin is for BlueNRG module to notify F401CDiscovery to receive packets.
- GNU toolchain The latest release (4.8 currently) of GNU Tools for ARM Embedded Processor is known to work.
- Flash tool Either openocd or stlink works.
- BlueNRG app (see below)
- (optional) LightBlue, BLE Utility Great BLE utilities for BLE developers.
BlueNRG app is available for both Android and iPhone:
Clone the project:
git clone https://github.com/winfred-lu/stm32f4-bluenrg.git
Build the project:
make clean make make flash
Start the BlueNRG app and connect.