TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139251 times)
  2. FAT32 Library (71748 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28076 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Gyro 8 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: Motion

Downloaded: 80 times

Not followed.

License: MIT license  

Gyro 8 Click is a compact add-on board that contains a high-performance gyroscope. This board features Murata's SCR2100-D08, a high-performance single-axis angular rate sensor (gyroscope). Based on Murata's proven capacitive 3D-MEMS technology, the SCR2100-D08 is characterized by high stability and reliability, providing immensely stable output over a wide range of temperatures, humidity, and vibration. This high-resolution gyroscope supports ±125°/s X-axis angular rate measurement range, extensive self-diagnostic features, an SPI serial interface, and low power consumption.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Gyro 8 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Gyro 8 Click" changes.

Do you want to report abuse regarding "Gyro 8 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Gyro 8 Click

Gyro 8 Click is a compact add-on board that contains a high-performance gyroscope. This board features Murata's SCR2100-D08, a high-performance single-axis angular rate sensor (gyroscope). Based on Murata's proven capacitive 3D-MEMS technology, the SCR2100-D08 is characterized by high stability and reliability, providing immensely stable output over a wide range of temperatures, humidity, and vibration. This high-resolution gyroscope supports ±125°/s X-axis angular rate measurement range, extensive self-diagnostic features, an SPI serial interface, and low power consumption.

gyro8_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2022.
  • Type : SPI type

Software Support

We provide a library for the Gyro 8 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Gyro 8 Click driver.

Standard key functions :

  • gyro8_cfg_setup Config Object Initialization function.

    void gyro8_cfg_setup ( gyro8_cfg_t *cfg );
  • gyro8_init Initialization function.

    err_t gyro8_init ( gyro8_t *ctx, gyro8_cfg_t *cfg );
  • gyro8_default_cfg Click Default Configuration function.

    err_t gyro8_default_cfg ( gyro8_t *ctx );

Example key functions :

  • gyro8_read_serial_id This function reads the serial ID which is laser marked on the sensor lid.

    err_t gyro8_read_serial_id ( gyro8_t *ctx, uint32_t *serial_id );
  • gyro8_read_temperature This function reads the temperature measurement in Celsius.

    err_t gyro8_read_temperature ( gyro8_t *ctx, float *temperature );
  • gyro8_read_angular_rate This function reads the angular rate of X-axis in dps.

    err_t gyro8_read_angular_rate ( gyro8_t *ctx, float *rate );

Example Description

This example demonstrates the use of Gyro 8 Click board by reading and displaying the temperature and angular rate measurements.

The demo application is composed of two sections :

Application Init

Initializes the driver and the Click board, and reads the serial ID number which is marked on the sensor lid.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    gyro8_cfg_t gyro8_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    gyro8_cfg_setup( &gyro8_cfg );
    GYRO8_MAP_MIKROBUS( gyro8_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == gyro8_init( &gyro8, &gyro8_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( GYRO8_ERROR == gyro8_default_cfg ( &gyro8 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    uint32_t serial_id;
    if ( GYRO8_OK == gyro8_read_serial_id ( &gyro8, &serial_id ) )
    {
        log_printf ( &logger, " Serial ID: %lu\r\n", serial_id );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Reads the temperature and angular rate measurements every 100ms and displays the results on the USB UART.

void application_task ( void )
{
    float temperature, angular_rate;
    if ( GYRO8_OK == gyro8_read_temperature ( &gyro8, &temperature ) )
    {
        log_printf ( &logger, " Temperature: %.2f degC\r\n", temperature );
    }
    if ( GYRO8_OK == gyro8_read_angular_rate ( &gyro8, &angular_rate ) )
    {
        log_printf ( &logger, " Angular rate: %.2f dps\r\n\n", angular_rate );
    }
    Delay_ms ( 100 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Gyro8

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Slider Click

0

Slider Click features a mechanical slide action potentiometer - a slider, which gives a nice feeling when actuating, along with 16 SMD LEDs, that can be used for any kind of visual feedback. The onboard high-resolution 22-bit ADC can detect even the smallest move, faithfully capturing the smoothness of the slider movement, while digitizing its position. The 16 onboard SMD LEDs can give a nice visual feedback of the slider position, but those LEDs can also be used for other purposes since they are not hardwired to the slider.

[Learn More]

H-Bridge 7 Click

0

H-Bridge 7 Click features flexible motor driver IC for a wide variety of applications, labeled as the DRV8876N. This Click board™ integrates an N-channel H-bridge, charge pump regulator, and protection circuitry. The charge pump improves efficiency by allowing for both high-side and low-side N-channels MOSFETs and 100% duty cycle support. This IC allows the H-Bridge 7 Click to achieve ultra-low quiescent current draw by shutting down most of the internal circuitry with his low-power sleep mode.

[Learn More]

NFC 2 Click

0

NFC 2 Click is a compact add-on board that contains a highly integrated NFC transceiver for contactless communication. This board features the PN7150, the best plug&play high-performance full NFC solution with integrated firmware and NCI interface designed for contactless communication at 13.56 MHz from NXP USA Inc.

[Learn More]