Shop OBEX P1 Docs P2 Docs Learn Events
Jonnymac beginner series 2 encoder wiring ? — Parallax Forums

Jonnymac beginner series 2 encoder wiring ?

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

Comments

  • JonnyMacJonnyMac Posts: 8,923
    edited 2021-01-02 23:53
    I'm sorry, I thought I went over this in the session:

    1. Ground
    2. 3.3v
    3. SW -- to the pin defined by ENC_BTN
    4. DT -- to the pin defined by ENC_B
    5. CLK -- to the pin defined by ENC_A

    Starting with Demo #3, all the pins are used. These are my definitions. You may change them if you like -- but all pins must be unique.
    con { app io pins }
    
      ENC_BTN  = 18  { I }                                          ' active-low encoder connections
      ENC_B    = 17  { I }                                          ' encoder data
      ENC_A    = 16  { I }                                          ' encoder clock
    

    I tend to use colors for specific functions -- for this project I did this:

    GND is Black
    3.3V is Orange (5.0V is Red)
    SW is Blue
    DT is Yellow
    CLK is White

    I'm a very visual person and using consistent color coding in my projects often helps me.
  • @JonnyMac
    Thank you very much for replying promptly.
    Now I am connected and playing with the P2.

    Thanks again,

    Siri
  • Where my pin outs inaccurate?
  • I probably moved them when I switched to using the Eval board for the demo. Again, the nice thing about named constants is this can be accommodated in one place and the rest of the program adjusts.
Sign In or Register to comment.