gyro4 2.0.0.0
|
Gyro 4 Click is a two-axis MEMS gyroscope for optical image stabilization applications.
We provide a library for the Gyro4 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Gyro4 Click driver.
- Initialization function.void gyro4_cfg_setup ( gyro4_cfg_t *cfg );
GYRO4_RETVAL gyro4_init ( gyro4_t *ctx, gyro4_cfg_t *cfg );
void gyro4_default_cfg ( gyro4_t *ctx );
- Getting die temperature valueuint8_t gyro4_spi_get ( gyro4_t *ctx, uint8_t register_address, uint8_t * register_buffer, uint16_t n_registers );
uint8_t gyro4_get_temperature ( gyro4_t *ctx, float * temperature );
uint8_t gyro4_get_axes( gyro4_t *ctx, float * x_axis, float * y_axis );
This application is a two-axis MEMS gyroscope for optical image stabilization.
The demo application is composed of two sections :
Initializes SPI device
Checks for data ready interrupt, gets axes and temperature data and logs those values
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.