We're no longer updating This wiki!!

Rotary-Encoder on Android

You must install the Android release V2.6 or higher to use Rotary-Encoder.
In this example, we used PEL12T Rotary Encoder.
Please check the revision of PCB. This page is based on the board revision 0.2.

This page explains how to use the Rotary-Encoder example.
It can be used for volume control, page up/down and etc.

Rotary-Encoder control example App project : Rotary-Encoder controller
Applied patches to kernel : patch 1, patch 2
PEL12T Data sheet

Rotary-Encoder circuit

If you want to connect pin to another GPIO pin, please check GPIO description.GPIO Pin description


The schematic of Rotary-Encoder circuit.

Result of using Rotary-Encoder and Controller app

After install the Rotary-Encoder controller app, you can map the gpio code and keycode to each opertions. you can change the keycode. reference

In first screen shot, Count clock wise operation is mapped to Volume Down, clock wise operations is mapped to Volume Up and switch button(push the Rotary-encoder) is mapped to mute key.

In second, Count clock wise operation is mapped to KEYCODE_DPAD_DOWN, clock wise operations is mapped to KEYCODE_DPAD_UP, and switch button is mapped to KEYCODE_ENTER.

en/c2_rotary-encoder_on_android.txt · Last modified: 2017/04/12 16:38 by codewalker
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0