TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 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 (136223 times)
  2. FAT32 Library (69489 times)
  3. Network Ethernet Library (55708 times)
  4. USB Device Library (45992 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40795 times)
  7. GSM click (28789 times)
  8. PID Library (26332 times)
  9. mikroSDK (26058 times)
  10. microSD click (25145 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: 1446 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

OLED C click

0

OLED C click is equipped with the 96x96 high-color OLED display. It can display up to 65K/262K different colors and shades on a compact size display, based on the OLED technology.

[Learn More]

Relay click

0

Relay click is a dual relay Click board, which can be operated by the host MCU. This Click board offers an elegant and easy solution for controlling a wide range of high power applications.

[Learn More]

eINK 2.90 inch display

0

eINK click is an adapter Click boardâ„¢, used to interface a compatible eINK display with the host MCU.

[Learn More]