How do I incorporate an if/then into this to print a warning messege when a specified value is reached on the potentiometer.
int ReadPot()
{
int i;
pin = output; pin = l;
for (i = 0; i < charge; i++);
pin = input;
for ( i = 0; pin == l; i++);
return I ;
}