Product ID 4991 (I2C rotary encoder)

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
michaelsraven
 
Posts: 3
Joined: Wed Nov 15, 2017 11:28 am

Product ID 4991 (I2C rotary encoder)

Post by michaelsraven »

Wherabouts of GitHub repository for this product? Specifically, I'm wanting to see the schematic & ATSAMD09 firmware. Am I just missing it, or is it still in development? If the latter, any target for publishing date?

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by mikeysklar »

The seesaw firmware has the encoder firmware that run on the SAMD09.

https://github.com/adafruit/seesaw

The other side of it would be the driver that runs on your controller to communicate with it:

; Arduino
https://github.com/adafruit/Adafruit_Seesaw

; Circuit Python
https://github.com/adafruit/Adafruit_Ci ... hon_seesaw

The schematic / PCB files are here. It looks like they just popped up in the last 7 hours so good timing.

https://github.com/adafruit/Adafruit-I2 ... ncoder-PCB

User avatar
michaelsraven
 
Posts: 3
Joined: Wed Nov 15, 2017 11:28 am

Re: Product ID 4991 (I2C rotary encoder)

Post by michaelsraven »

I did see the User Guide from Kattni Rembor pop up in the last couple of hours, and its links to the project's Eagle files gave me everything I needed in that regard.

Thanks so much for the pointers to the seesaw firmware. Perhaps those deserve a place in the User Guide as well.

User avatar
fusionjunky
 
Posts: 3
Joined: Wed Jul 29, 2015 2:04 am

Re: Product ID 4991 (I2C rotary encoder)

Post by fusionjunky »

I'm not finding the I2C device at the designated address. Anyone else?

User avatar
panellaj
 
Posts: 7
Joined: Mon Jul 27, 2020 2:38 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by panellaj »

Is there a reason why the rotation seems to be in the opposite direction? clockwise decrements and counter-closewise increments. I've tried multiple examples and they all do the same thing.

Testing using a QT PY and the Adafruit I2C QT Rotary Encoder with NeoPixel - STEMMA QT

Thanks

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by mikeysklar »

@fusionjunky - Please start a new thread with the i2c discovery issues. That could be a wiring / setup issue we need to help you resolve.

@panellaj -
In the demo we have on the product page the encoder is being turned to the right (clockwise) to increase the value. Pick an example that appears to be going backwards and we will look at it together.

https://www.adafruit.com/product/4991

User avatar
panellaj
 
Posts: 7
Joined: Mon Jul 27, 2020 2:38 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by panellaj »

Using the example from below, it starts at position 0. As I turn the encoder clockwise, the number decreases with negative numbers. Turning counter clockwise, the number increases. Is this the intended result?

Thanks

https://github.com/adafruit/Adafruit_Ci ... pletest.py

User avatar
panellaj
 
Posts: 7
Joined: Mon Jul 27, 2020 2:38 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by panellaj »

Another example below. I've modified this code to use the same adafruit_seesaw library. When I turn the encoder clockwise, the volume decreases. When I turn it counter clockwise, the volume increases. I could simply change the condition statement but why is it different?

https://github.com/todbot/qtpy-knob/blo ... _simple.py

User avatar
fusionjunky
 
Posts: 3
Joined: Wed Jul 29, 2015 2:04 am

Re: Product ID 4991 (I2C rotary encoder)

Post by fusionjunky »

Figured out my problem: there were two I2C buses on the board, and I was using the wrong one. :)

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by mikeysklar »

@panellaj,

Can you post a photo of how your boards are connected via the QT connectors? I want to see the orientation of the boards releative to the position in our example images to determine if that is the difference.

I see your point that you could just swap the diff '<' and '>' 0 statements to flip the direction. My thought is that your are just connecting the QT connectors on the opposite sides that the demo was using.

User avatar
panellaj
 
Posts: 7
Joined: Mon Jul 27, 2020 2:38 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by panellaj »

I only have the encoder connected. QT Py --> I2C encoder via QT/STEMMA
Attachments
encoder.jpeg
encoder.jpeg (368.89 KiB) Viewed 415 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by mikeysklar »

Okay, looks like the same orientation.

Would you mind opening an issue on the Adafruit_CircuitPython_seesaw github repo about the reverse direction. I suspect the '<' and '>' can just be flipped in the example code and this will be resolved.

https://github.com/adafruit/Adafruit_Ci ... saw/issues

User avatar
Howmanga
 
Posts: 3
Joined: Sat Nov 28, 2020 12:12 am

Re: Product ID 4991 (I2C rotary encoder)

Post by Howmanga »

I ran into an issue while running the seesaw_rotary_simpletest.py example with the I2C rotary breakout. You can get many false presses and releases of the push button when the ungrounded lead from the push button is accidentally touched. This can easily occur while simply resting the board in the palm of your hand.

I suggest you add the following line to the seesaw_rotary_simpletest.py to enable the pull-up resistor:

Code: Select all

seesaw.pin_mode(24, seesaw.INPUT_PULLUP)

User avatar
panellaj
 
Posts: 7
Joined: Mon Jul 27, 2020 2:38 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by panellaj »

Maybe I'm confused but even in the example code/videos, when they turn the encoder clockwise the number decreases. Why?

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Product ID 4991 (I2C rotary encoder)

Post by mikeysklar »

In the product demo animated GIF turning the encoder clockwise increases the value.

https://www.adafruit.com/product/4991

That demo is based on the Arduino code which includes optional OLED and multiple encoder. Totally different than the CircuitPython code.

https://github.com/adafruit/Adafruit_Se ... coders.ino

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”