Rotary with Espruino Pico #910
Replies: 13 comments
-
Posted at 2017-01-15 by ClearMemory041063 The pimoroni link you cited points to this tutorial for Arduino. Looks like it uses ground and two digital input pins. http://bildr.org/2012/08/rotary-encoder-arduino/ If needed you can examine the encoder module code that is located here. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-15 by ClearMemory041063 This may help:
Now using Pin B4 instead of the button, connect one of the encoder output to pin B4 and the other common wire to ground.
See if the LED blinks as you turn the shaft encoder |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-15 by user71789 Hi ClearMemory041063 https://drive.google.com/file/d/0B-qOFGzMJqfYSmxUY3ZzbjRvZVU/view?usp=sharing |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-15 by ClearMemory041063 So does that work ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by user71789 ClearMemory041063 I dont know, this was just how I read your suggestion, does it look right? I haven't got my breadboard yet, so before I go solder anything, I would like to know if it's right:) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by ClearMemory041063 Now you have me a bit worried. The oriental specifications for this device are sketchy at best. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Spocki Have a look at the drawing. A and B are the encoder outputs and C the Vcc of the encoder (use it with the espruino encoder module). Pins 1 - 5 are for the three led's (1|2|4), the button (3) and Vcc (5). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by user71789 Hi Spocki, thank you, this looks right. I dont need the LEDs, only the rotate and button functionality. Do you know how I connect it to the Pico? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by luwar Rotary → Pico It is possible that you have to swap A1 and A2. It depends on the detents of the encoder. Then use the sample code of the encoder module:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by luwar It was stupid from me to use A1 and A2 in the code above. It is hard to wire on the pico. Just use some other pins like B3 and B4. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by user71789 @luwar, thanks a million just what I needed. And for the button to work, is that "3" ... if so, where does this go on the Pico? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by luwar When using the switch you need pin 5 of the rotary too. Rotary → Pico As @ClearMemory041063 mentioned above it is easy to watch a pin:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by user71789 This is SOOO awesome, thanks @ClearMemory041063 and @luwar for your help! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-15 by user71789
Hey guys,
I've purchased a Pico and this Rotary https://shop.pimoroni.com/products/rotary-encoder-illuminated-rgb and would like to solder this to my Pico. I'm new to this and trying to create a prototype, so hopefully, you can help me. Which arms on the rotary goes to where on the Pico? I found this https://www.espruino.com/Encoder Looks like they need to connect to A1, A2 and 3.3v.
Beta Was this translation helpful? Give feedback.
All reactions