TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136998 times)
  2. FAT32 Library (70114 times)
  3. Network Ethernet Library (56027 times)
  4. USB Device Library (46347 times)
  5. Network WiFi Library (41966 times)
  6. FT800 Library (41286 times)
  7. GSM click (29053 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25413 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

pH click

Rating:

5

Author: MIKROE

Last Updated: 2020-12-04

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Environmental

Downloaded: 1533 times

Not followed.

License: MIT license  

pH Click is a compact add-on board that provides an opportunity for the user to read pH with the same accuracy and capabilities as with some other expensive solutions.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "pH click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "pH click" changes.

Do you want to report abuse regarding "pH click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

pH click

pH click

Native view of the pH click board.

View full image
pH click

pH click

Front and back view of the pH click board.

View full image

Library Description

The library covers all the functions necessary to control pH Click board™. It initializes and defines the UART drivers, and holds functions that allow full control of the device to the user.

Key functions:

  • void ph_send_cmd ( char *p_cmd ); - Function is used to send command and does not expect response.
  • void ph_perf_calib ( char *point, float flt_val, char *p_resp ); - Function is used to perform calibration.
  • ph_response ( char *p_resp ); - Function is used to handle collected data.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes UART module and LOG structure.
  • Application Initialization - Initalizes UART driver, sets up driver up the device, and performs a single point calibration.
  • Application Task - This example shows capabilities of pH Click board™ by reading user's perform single read input from USART terminal and performs reading of pH value of the supstance in which the probe is submerged and displaying readings via USART terminal.
void application_task ( )
{
    char cmd;

    ph_clr_log_buf( &log_txt[ 0 ] );
    if ( UART_Rdy_Ptr() )
    {
        cmd = UART_Rd_Ptr( );
        mikrobus_logWrite( "", _LOG_LINE );
        mikrobus_logWrite( " pH value: ", _LOG_TEXT );
        ph_send_cmd ( PH_CMD_SET_SNGL_READ );
        Delay_ms( 1000 );
        ph_response( &log_txt[ 0 ] );
        mikrobus_logWrite( &log_txt[ 0 ], _LOG_LINE );
    }
}

Additional Functions :

  • void float_to_str ( uint8_t byte_buf, uint8_t *str ) - Wrapper FloatToStr for driver function.
  • void long_word_to_str ( uint32_t long_word_buf, uint8_t *str ) - Wrapper LongWordToStr for driver function.
  • void byte_to_str ( uint8_t byte_buf, uint8_t *str ) - Wrapper ByteToStr for driver function.

Other mikroE Libraries used in the example:

  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

MRAM 4 click

0

MRAM 4 Click is a compact add-on board representing a magneto-resistive random-access memory solution. This board features the EM064LX, an industrial STT-MRAM persistent memory from Everspin Technologies. It is a 64Mb MRAM IC RAM and can achieve up to 200MHz as a single and double data rate (STR/DTR). The MRAM technology is analog to Flash technology with SRAM-compatible read/write timings (Persistent SRAM, P-SRAM), where data is always non-volatile. It also has a hardware write-protection feature and performs read and write operations with data retention for ten years and unlimited read, write, and erase operations for the supported life of the chip.

[Learn More]

Charger 9 click

0

Charger 9 click is a Li-Ion (Li+, Li-Po) battery charger, capable of charging one, two or three battery cells.

[Learn More]

Magnetic Rotary click

0

Magnetic rotary click is a very accurate position sensing Click board™ which utilizes the HMC1512, a magnetic field displacement sensor IC.

[Learn More]