TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (355 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 (136934 times)
  2. FAT32 Library (70053 times)
  3. Network Ethernet Library (56013 times)
  4. USB Device Library (46328 times)
  5. Network WiFi Library (41936 times)
  6. FT800 Library (41249 times)
  7. GSM click (29041 times)
  8. mikroSDK (26441 times)
  9. PID Library (26435 times)
  10. microSD click (25391 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: 1519 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

EERAM 5v click

5

Add memory to your project with EERAM 5V click. It carries the 47L16/47C16 I2C serial EERAM from Microchip. The click is designed to run on a 5V power supply. It communicates with the target microcontroller over I2C interface, with additional functionality provided by the INT pin on the mikroBUSâ„¢ line.

[Learn More]

AlphaNum R click

5

AlphaNum R click is a simple solution for adding 14-segment alphanumeric displays to your device. The board carries two TLC5926 16-bit Constant-Current LED sink Drivers as well as a dual character LED 14-segment display. The board is designed to use either a 3.3V or 5V power supply.

[Learn More]

LDC Touch click

0

LDC Touch Click is a compact add-on board optimized for inductive touch applications. This board features the LDC3114-Q1, a four-channel inductance-to-digital converter for low-power proximity and touch-button sensing from Texas Instruments. It comes with an adjustable sensitivity per input channel and operational power mode selection and measures frequency shifts caused by micro-deflection in the conductive targets formed by button presses. These presses are reported through a compatible I2C interface beside four LED indicators for its visual indication. This Click board™ enables touch button design for human-machine interface and precise linear position sensing of metal targets for automotive, consumer, and industrial applications by allowing access to the raw data representing the inductance value.

[Learn More]