-->
Page 1 of 2

Firmware support for a rotary encoder

PostPosted: Sat Jun 27, 2015 2:26 pm
by bubnikv
Hi gang.

I would like to build a responsive WiFi tuning knob for a software defined radio receiver. I would connect a high resolution rotary encoder to the ESP8266 board, I would track the rotary encoder and send the updates over WiFi. The knob needs to react very quickly and precisely, and the state has to be sent to the radio control software with a low latency, otherwise the user experience will suffer. I am afraid, that handling the rotary encoder state in LUA would not work reliably if overlapped with the WiFi processing, which is mandatory.

Would it be possible to integrate a rotary encoder routine into the firmware? Ideally, I would enable the rotary encoder on two input pins and then I would either register for a rotary encoder state change event, or poll for the change. Then I would get either an absolute value (a 16bit int with wrap around would be ok), or an increment since the last call.

Thank you,
Vojtech

Re: Firmware support for a rotary encoder

PostPosted: Sun Jun 28, 2015 4:56 pm
by ucy74
You can do this by interrupts on two pins, on one pin or without interrupts...
Is this possible to double encoder resolution too.

Some ideas - link

Re: Firmware support for a rotary encoder

PostPosted: Tue Jun 30, 2015 2:29 am
by alon24
If you want this is sming check this out:

Original idea from http://bildr.org/2012/08/rotary-encoder-arduino/

https://github.com/alon24/esp8266_projects

Re: Firmware support for a rotary encoder

PostPosted: Tue Sep 29, 2015 9:25 am
by anupak
I was able to interface a rotary encoder to ESP-01 using a I2c port expander PCF8574 http://forgetfullbrain.blogspot.in/2015/09/interfacing-rotary-encoder-using-i2c.html.

Unfortunately code in in C (SDK). Anyway should give you ideas.

-Anup