TOP Contributors

  1. MIKROE (2657 codes)
  2. Alcides Ramos (354 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (136899 times)
  2. FAT32 Library (70034 times)
  3. Network Ethernet Library (56005 times)
  4. USB Device Library (46308 times)
  5. Network WiFi Library (41934 times)
  6. FT800 Library (41231 times)
  7. GSM click (29021 times)
  8. PID Library (26434 times)
  9. mikroSDK (26401 times)
  10. microSD click (25387 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

EZO Carrier DO click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.3

mikroSDK Library: 2.0.0.0

Category: Environmental

Downloaded: 7 times

Not followed.

License: MIT license  

EZO Carrier Click - Oxygen is a compact add-on board suitable for determining the dissolved oxygen of a liquid in your application. This board features the EZO-DO™, an ISO 5814 compliant embedded dissolved oxygen circuit board from Atlas Scientific.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "EZO Carrier DO click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "EZO Carrier DO click" changes.

Do you want to report abuse regarding "EZO Carrier DO click".

  • Information
  • Comments (0)

mikroSDK Library Blog


EZO Carrier DO click

EZO Carrier Click - Oxygen is a compact add-on board suitable for determining the dissolved oxygen of a liquid in your application. This board features the EZO-DO™, an ISO 5814 compliant embedded dissolved oxygen circuit board from Atlas Scientific.

ezocarrierdo_click.png

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Oct 2023.
  • Type : UART type

Software Support

We provide a library for the EZO Carrier DO 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 EZO Carrier DO Click driver.

Standard key functions :

  • ezocarrierdo_cfg_setup Config Object Initialization function.

    void ezocarrierdo_cfg_setup ( ezocarrierdo_cfg_t *cfg );
  • ezocarrierdo_init Initialization function.

    err_t ezocarrierdo_init ( ezocarrierdo_t *ctx, ezocarrierdo_cfg_t *cfg );

Example key functions :

  • ezocarrierdo_send_cmd Send command function.

    void ezocarrierdo_send_cmd ( ezocarrierdo_t *ctx, uint8_t *cmd );
  • ezocarrierdo_send_cmd_with_par Send command function with parameter.

    void ezocarrierdo_send_cmd_with_par ( ezocarrierdo_t *ctx, uint8_t *cmd, uint8_t *param_buf );
  • ezocarrierdo_send_cmd_check Check the sent command.

    void ezocarrierdo_send_cmd_check ( ezocarrierdo_t *ctx, uint8_t *cmd );

Example Description

This example demonstrates the use of EZO Carrier DO click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, performs the click default factory reset, and high point calibration.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ezocarrierdo_cfg_t ezocarrierdo_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.
    ezocarrierdo_cfg_setup( &ezocarrierdo_cfg );
    EZOCARRIERDO_MAP_MIKROBUS( ezocarrierdo_cfg, MIKROBUS_1 );
    if ( UART_ERROR == ezocarrierdo_init( &ezocarrierdo, &ezocarrierdo_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_printf( &logger, "Device status \r\n" );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_STATUS );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_OK );
    ezocarrierdo_error_check( error_flag );

    log_printf( &logger, "Factory reset \r\n" );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_FACTORY );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_READY );
    ezocarrierdo_error_check( error_flag );

    log_printf( &logger, "Device info \r\n" );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_DEV_INFO );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_OK );
    ezocarrierdo_error_check( error_flag );

    uint8_t n_cnt = 0;
    uint8_t last_reading[ APP_BUFFER_SIZE ] = { 0 };
    ezocarrierdo_clear_app_buf( );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_SINGLE_READ );
    ezocarrierdo_process ( &ezocarrierdo );
    strcpy( last_reading, app_buf );
    log_printf( &logger, "High point calibration \r\n" );
    log_printf( &logger, "Waiting for stable readings \r\n" );
    while ( n_cnt <= 5 )
    {
        if ( EZOCARRIERDO_OK == ezocarrierdo_process ( &ezocarrierdo ) )
        {  
            if ( 0 == strstr( app_buf, last_reading ) )
            {
                n_cnt++;
            }
            else
            {
                strcpy( last_reading, app_buf );
                n_cnt = 0;
            }
        }
        log_printf( &logger, "- " );
        Delay_ms ( 1000 );
        ezocarrierdo_clear_app_buf( );
    }

    log_printf( &logger, "\r\n Calibration \r\n" );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_CAL );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_OK );
    ezocarrierdo_error_check( error_flag );

    #define DISABLE_CONT_READ   "0"
    log_printf( &logger, "Disable continuous reading mode \r\n" );
    ezocarrierdo_send_cmd_with_par( &ezocarrierdo, EZOCARRIERDO_CMD_CONT_READ, DISABLE_CONT_READ );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_OK );
    ezocarrierdo_error_check( error_flag );

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

Application Task

Reads and processes all incoming dissolved oxygen data from the probe, and displays them on the USB UART in mg/L.

void application_task ( void ) 
{
    log_printf( &logger, "Reading... \r\n" );
    ezocarrierdo_send_cmd( &ezocarrierdo, EZOCARRIERDO_CMD_SINGLE_READ );
    error_flag = ezocarrierdo_rsp_check( &ezocarrierdo, EZOCARRIERDO_RSP_OK );
    ezocarrierdo_error_check( error_flag );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

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.EZOCarrierDO

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

ATA663211 click

0

ATA663211 click is a LIN transceiver that carries an Atmel ATA663211 IC and runs on 3.3V power supply. The click communicates with the target MCU through UART connection. The IC is designed to handle low-speed data communication in vehicles.

[Learn More]

DIGI POT 3 click

5

DIGI POT 3 click is a versatile and feature-rich digital potentiometer click with 1024 steps and an internal non-volatile memory (EEMEM), which can be used for storing the wiper position, but also for storing various user data.

[Learn More]

Pressure 2 click

0

Pressure 2 click carries MS5803, a high resolution MEMS pressure sensor that is both precise and robust. Its measurement range is from 0 to 14 bars (with a resolution of up to 0.2 mbars), but because of the stainless steel cap enclosure, the sensor can withstand up to 30 bars of pressure. Pressure 2 click communicates with the target board MCU either through mikroBUS SPI or I2C lines, depending on the position in which the onboard jumpers are soldered.

[Learn More]