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]
Rating:
Author: MIKROE
Last Updated: 2019-03-08
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Digital potentiometer
Downloaded: 4447 times
Not followed.
License: MIT license
POT Click is a Click board with the accurate selectable reference voltage output. By employing a high-quality 10mm carbon potentiometer, this Click board can provide very accurate voltage output.
Do you want to subscribe in order to receive notifications regarding "POT click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "POT click" changes.
Do you want to report abuse regarding "POT click".
Library Description
The library initializes GPIO interface for the desired mikrobus selection. For more details check documentation.
Key functions:
void pot_gpioDriverInit( T_POT_P gpioObj )
- Function initializes GPIO driver for the desired mikrobus.Examples description
The application is composed of the three sections :
void applicationTask()
{
for (nSamples = 0; nSamples < N_SAMPLES; nSamples++)
{
adcRead = ADC_Get_Sample( 0 );
if (nSamples == 0)
{
adcMax = adcRead;
adcMin = adcRead;
}
if (adcRead > adcMax)
{
adcMax = adcRead;
}
else if (adcRead < adcMin)
{
adcMin = adcRead;
}
Delay_ms( 1 );
}
adcAvrg = adcMax;
adcAvrg += adcMin;
adcAvrg /= 2;
adcAvrg /= ADC_12BIT_RESOL;
adcAvrg *= ADC_V_REF_MV;
adcRead = adcAvrg;
WordToStr( adcRead, text );
mikrobus_logWrite( "** AN : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " mV **", _LOG_LINE );
Delay_ms( 100 );
}
Other mikroE Libraries used in the example:
ADC
Conversions
UART
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.