-
• #2
This looks great - thanks!
Would there be any problem with me copying this into an example to put on espruino.com itself?
-
• #3
Very happy for you to put it on Espruino.com as an example - I would be honoured!
-
• #4
Thanks! Just added at https://www.espruino.com/Puck.js+Rotary+Encoder
-
• #5
Very cool! Could you share the source of your GPIO connectors ? I have similar project and hd to solder, which I am not very good at, especially in small, close pins.. Thank you
-
• #6
The sockets are actually for IC pins and the last place I bought something similar was from Mechboards .
The usual breadboard jumper wires are too thick for these sockets and I am afraid I have no idea where the ones in the picture came from.
This project was driven by the inconvenience of using SDR (Software Defined Radio) programs without having an explicit physical tuning knob to adjust frequency. Subsequently, I have found it also useful for scrolling with tablets.
The implementation uses an Espruino Puck.js and a rotary encoder as shown below in the breadboard prototype and the final device.
Connections are (Encoder -> Puck): GND -> GND, SW -> D28, ENCODER -> D29,D30.
The program below presents the Rotary Encoder as the middle wheel and button of a bluetooth mouse.
The encoder handler is adapted from here and I found it worked much more reliably than the Espruino encoder module. In addition the following code allows the device to switch from HID to normal Espruino mode for connection to the WebIDE i.e. hold down the encoder switch until the Puck flashes GREEN. On reboot or reset, it will go into HID mode by default and flash BLUE. On connection, there is a BlUE flash and a RED flash on disconnection.