digitalRead set threshold

Try something like this

bool digitalAnalogRead( uint8_t pin )
{
	return analogRead( pin ) > 500;
}
2 Likes