A theoretical question
hi,
i wondering why have use pinmode declaration in sketches. if use analogwrite or digitalwrite command specific pin, doesn't imply particular pin output? , if use read versions of similar command, doesn't imply opposite?
thanks
i wondering why have use pinmode declaration in sketches. if use analogwrite or digitalwrite command specific pin, doesn't imply particular pin output? , if use read versions of similar command, doesn't imply opposite?
thanks
quote
doesn't imply particular pin output?
using analogwrite(), yes. using digitalwrite(), no. might turning pullup resistor on input pin.
quote
and if use read versions of similar command, doesn't imply opposite?
pins default input, read works without need use pinmode(). in fact, though, can read state of output pin. so, digitalread() rells nothing state of pin.
Arduino Forum > Using Arduino > Programming Questions > A theoretical question
arduino
Comments
Post a Comment