|
2 | 2 |
|
3 | 3 | # RotaryEncoder<br>
|
4 | 4 |
|
5 |
| -<img src="https://github.com/SV-Zanshin/RotaryEncoder/blob/master/Images/RotaryEncoder.jpg" width="175" align="right"/> *Arduino* library which defines methods for accessing the 3-Color LED Rotary Encoder. This is manufactured by Top-Up and other companies and is available from many sources on the internet. The manufacturer's serial number is EC12PSD-017 and it can be found referenced at sources such as |
6 |
| -https://www.sparkfun.com/products/10982 or https://www.proto-pic.co.uk/rotary-encoder-illuminated-rgb.html along with numerous other |
| 5 | +<img src="https://github.com/Zanduino/RotaryEncoder/blob/master/Images/RotaryEncoder.jpg" width="175" align="right"/> *Arduino* library which defines methods for accessing the 3-Color LED Rotary Encoder. This is manufactured by Top-Up and other companies and is available from many sources on the internet. The manufacturer's serial number is EC12PSD-017 and it can be found referenced at sources such as |
| 6 | +https://www.sparkfun.com/products/10982 or https://www.proto-pic.co.uk/rotary-encoder-illuminated-rgb.html along with numerous other |
7 | 7 | places on eBay or Amazon. The encoder sends out rotational information on 2 pins using a quadrature system and also has a pushbutton.
|
8 | 8 |
|
9 | 9 | While I've seen a couple of libraries that will work for this encoder, I wanted to use this in a project and opted to create a specific
|
10 |
| -library for it. It not only supports setting colors for the clockwise, counterclockwise and pushbutton along with a pleasing fade; but |
| 10 | +library for it. It not only supports setting colors for the clockwise, counter clockwise and pushbutton along with a pleasing fade; but |
11 | 11 | is also designed to work with Atmel's/Arduino's interrupts so that any program using this class can process normally and only query the
|
12 |
| -pushbutton state and the current rotational value when it needs to. Using interrupts limits the class to those pins which support |
| 12 | +pushbutton state and the current rotational value when it needs to. Using interrupts limits the class to those pins which support |
13 | 13 | hardware interrupt, but that limitation is offset by the efficiency with which the class works.
|
14 | 14 |
|
15 |
| -The hardware interrupt pins vary from one Atmel processor to another and need to be checked; the example programs for this class use |
| 15 | +The hardware interrupt pins vary from one Atmel processor to another and need to be checked; the example programs for this class use |
16 | 16 | those pins available for the Arduino Micro (ATmega32U4). Newer processors impose less restrictions on which pins support hardware interrupts.
|
17 | 17 |
|
18 | 18 | Likewise the 3 pins used for the Red, Green and Blue LED lights need to be PWM-capable pins, which vary from processor to processor. The
|
19 |
| -rotary encoder uses a common cathode (+) pin, so the 3 lights are driven to ground for full power and high for "OFF"; meaning an analog |
| 19 | +rotary encoder uses a common cathode (+) pin, so the 3 lights are driven to ground for full power and high for "OFF"; meaning an analog |
20 | 20 | write of "255" turns the respective LED off and an analog write of "0" turns it on at full power.
|
21 | 21 |
|
22 |
| -Fading of the colored encoder LEDs is done by using the timer0, which is used by the Arduino millis() function and fires approximately every millisecond. |
| 22 | +Fading of the colored encoder LEDs is done by using the timer0, which is used by the Arduino millis() function and fires approximately every millisecond. |
23 | 23 |
|
24 |
| -See the [Wiki pages for details](https://github.com/SV-Zanshin/RotaryEncoder/wiki) of the class and the variables / functions accessible in it. |
| 24 | +See the [Wiki pages for details](https://github.com/Zanduino/RotaryEncoder/wiki) of the class and the variables / functions accessible in it. |
25 | 25 |
|
26 | 26 | [ <img src="https://zanduino.github.io/Images/zanshintext.gif" width="75"/>](https://www.sv-zanshin.com)
|
0 commit comments