I'm trying to read an analog input on the Attiny85 physical pin 6 (PB1, PWM), but analogRead(PB1) always returns 1023. Is it even possible to use analogRead on this pin? I'm fairly new to this so sorry if it's an obvious answer. Thanks!
-
1section 10.3.1 ww1.microchip.com/downloads/en/DeviceDoc/…Juraj– Juraj ♦2021年01月13日 20:49:10 +00:00Commented Jan 13, 2021 at 20:49
1 Answer 1
PB1 has no analog input. So no, you can't read analog with it.
For analog you must use any of PB2 through PB5.
answered Jan 13, 2021 at 20:49
-
oh shoot... alright, thank you for the quick answer!!Quentin HUET– Quentin HUET2021年01月13日 20:58:02 +00:00Commented Jan 13, 2021 at 20:58