Example: Read raw temperature from BMP180 over I2C and print via UART2. More...
#include "navhal.h"
Macros | |
| #define | CORTEX_M4 |
| #define | BMP180_ADDR 0x77 |
| #define | BMP180_REG_CONTROL 0xF4 |
| #define | BMP180_REG_RESULT 0xF6 |
| #define | BMP180_CMD_TEMP 0x34 |
| #define | I2C_BUS I2C1 |
Functions | |
| int | main (void) |
Example: Read raw temperature from BMP180 over I2C and print via UART2.
© 2025 NAVROBOTEC PVT. LTD. All rights reserved.
| #define BMP180_ADDR 0x77 |
| #define BMP180_CMD_TEMP 0x34 |
| #define BMP180_REG_CONTROL 0xF4 |
| #define BMP180_REG_RESULT 0xF6 |
| #define CORTEX_M4 |
| #define I2C_BUS I2C1 |
| int main | ( | void | ) |
< Initialize SysTick for delays
< Initialize UART2 at 9600 baud
< Stop execution if I2C init fails
< Wait for conversion (~4.5 ms for temperature)
< Assumes uart2_write_int exists
< Wait 1 second before next measurement