The rotary encorder pin connections?
msiriwardena
Posts: 301
in Propeller 2
The jonnymacs beginner series 2 , the encoder has 5 pins.
There are no directions how to connect them to the P2 Edge.
Thins are 1. Ground
2. + --> 5v OR 3.3v
3.SW -
4.DT
5.CLK
Thank you,
Siri
There are no directions how to connect them to the P2 Edge.
Thins are 1. Ground
2. + --> 5v OR 3.3v
3.SW -
4.DT
5.CLK
Thank you,
Siri
Comments
I don't like using "magic numbers" for pins, so they're always defined in my apps.
In the version I'm running... This is the beauty of named constants -- we only have to change them in one place. Note that ENC_BTN is the SW connection on the encoder.
I also like to use specific colors when wiring:
-- Black for Ground
-- Orange for 3.3V (Red for 5.0V)
-- Blue for the SW pin
-- Yellow for the DT pin
-- White for the CLK pin