Trinket 5v with rotary encoder

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
VbZa
 
Posts: 1
Joined: Wed Dec 22, 2021 1:41 pm

Trinket 5v with rotary encoder

Post by VbZa »

Hi guys,

I'm having some trouble with the limited pins on the 5v Trinket (running at 8mhz).
I'm using a library to interpret pulses from a rotary encoder and everything works flawlessly when using pins 0 and 2 in pull up fashion. I need pin 2 for the adc though so I've switched to using pins 0 and 1.
Changed nothing else except updating the pin numbers in my code but it refuses to work. Is there something I'm missing? What makes pin 1 so different from pin 2 for basic digitalread function? Could the onboard LED be interfering?

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket 5v with rotary encoder

Post by dastels »

It very well could be the LED. The old Trinkets have been depricated and newer board are more capable.

From the product page:
Deprecation Warning: The Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Trinket so that people can maintain some older projects, we no longer recommend it. Please check out the Trinket M0. It has built-in USB, more capabilities, and is comparable in price!
The Trinket M0 https://www.adafruit.com/product/3500 is a good choice if you want a direct physical replacement. The QTPy M0 https://www.adafruit.com/product/4600 is sort of the modern design for a small, simple board.

Dave

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

Return to “Trinket ATTiny, Trinket M0”