Arduino Forum
digitalRead set threshold
Projects
Programming
guix
September 5, 2023, 9:56pm
4
Try something like this
bool digitalAnalogRead( uint8_t pin ) { return analogRead( pin ) > 500; }
2 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
put analogRead and digitalRead in 1 if statement.
Programming
3
705
May 5, 2021
digitalRead of input pin is not work properly
General Electronics
78
28263
May 6, 2021
digitalRead reads LOW even though it should be HIGH
Programming
9
3071
May 5, 2021
Using of analogRead and analogWrite
Sensors
4
6246
May 6, 2021
Setting a Threshold Value
Programming
13
27867
May 5, 2021