Update 21.5.2014: Here is the source code: https://github.com/renerento
Yes, Arduino, a piece of electronics that divides people. Some of us like it and some of us hate it. I like it.
Some time ago I bought 2 Arduinos at once and started to play with them. At first my goal was connect an Arduino to LCD and display some data on it. Then I realized that I have a rotary encoder and it would be fun to use that component as well. I digged code snippets from internet and found many ways to connect a rotary encoder to Arduino. Some of them used external capasitors for debouncing and I did not like that. Then I found Ben Buxton’s home page and used part of his code to make things click.
I also had some DS1820 temperature probes lying around and I decided to connect also them to Arduino. Maybe later more about that topic.
I found a simple aluminum enclosure. I modified it a bit for my components to fit in and started coding. As I am not a real coder, I simply searched code from the internet and modified it to suit for my applications.
This code does following:
When powered on string on LCD is displayed “LED dimming test”. After that display goes blank. When one rotates encoder LCD shows either string “Minimum value reached!” or up going numbers. Simultaneously with up going numbers the USB LED from Ikea starts to shine. The more the numbers grow the more LED shine, until it reaches the max value. When that happens LCD says “Maximum value reached!” User can decrease or increase the level of the numbers and brightness simple rotating encoder. Numbers change 5 unit per one encoder click, min is of course 0, max is 255.
Here are some pics and video.