EasyManuals Logo

ST STM32 Nucleo Application Note

ST STM32 Nucleo
16 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #11 background image
DocID026958 Rev 1 11/16
AN4594 Guide for writing applications
16
Reading data from sensor expansion board
The BSP provides the API and the functionality for taking the data from sensors. Once the
sensors are initialized we can get data from them using these functions:
BSP_HUM_TEMP_GetTemperature(float * Temp)
This API gives the access to temperature sensor data.
BSP_HUM_TEMP_GetHumidity (float * Humid)
This API gives the access to humidity sensor data.
BSP_PRESSURE_GetPressure((float *)&Press)
This API gives the access to pressure sensor data.
BSP_IMU_6AXES_X_GetAxesRaw ((AxesRaw_TypeDef *)&ACC_Value)
This API gives the access to accelerometer sensor data.
BSP_IMU_6AXES_G_GetAxesRaw((AxesRaw_TypeDef *)&GYR_Value)
This API gives the access to gyroscope sensor data.
BSP_MAGNETO_M_GetAxesRaw((AxesRaw_TypeDef *)&MAG_Value)
This API gives the access to magnetometer sensor data.
4.2 Application description
An example application using the sensor expansion board with the Nucleo F4 board can be
downloaded from [$BASE_DIR\Projects\STM32F4xx-
Nucleo\Examples\EWARM\project.eww]. In this application, real-time sensor data is
transmitted to PC via a serial port using system call HAL_UART_Transmit(). Transmitted
sensor data can be viewed using Sensors_Datalog, a PC-based application developed by
STMicroelectronics (refer to Section 5 for further details). Sensors_Datalog can be used to
read and visualize data from the sensor expansion board connected to the PC via the
Nucleo board. The firmware provided formats the sensor data that can be read by the
Sensors_Datalog utility. For example, sending temperature data through UART is typically
handled by the following steps:
BSP_HUM_TEMP_isInitialized();
BSP_HUM_TEMP_GetTemperature();
Serialize();
HAL_UART_Transmit();
The Serialize() function formats the temperature data readable by the Sensors_Datalog
utility. Similarly, data from other sensors is also formatted and communicated to the utility.
When connected via Teraterm, the user can press the blue button on the Nucleo board to
start and stop the data log.

Other manuals for ST STM32 Nucleo

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32 Nucleo and is the answer not in the manual?

ST STM32 Nucleo Specifications

General IconGeneral
On-board DebuggerST-LINK/V2-1
MicrocontrollerSTM32 Series (varies by model)
ConnectivityUSB
HeadersArduino Uno R3 and ST Morpho
CoreARM Cortex-M (varies by model)
Operating Voltage3.3V
Clock SpeedVaries depending on the STM32 MCU
Flash MemoryVaries depending on the STM32 MCU
SRAMVaries depending on the STM32 MCU
GPIO PinsVaries depending on the STM32 MCU
ADC ResolutionVaries depending on the STM32 MCU
DAC ResolutionVaries depending on the STM32 MCU
Communication InterfacesSPI, I2C
Debug InterfaceSWD

Related product manuals