While working on the constant current load project I found that while nice, the multiple turns required to turn up the power up was a little annoying when you just wanted to hurry up and get to a high value. The standard solution is to have a "fine" and "course" knob. Since I designed the input in the digital realm it seemed like software was the obvious solution. Why not sense the speed the user is turning the knob and extrapolate the pace of change based on that input. It seems intuitive to me. I implemented it as a little C++ library that you can drop into your arduino/libraries directory. Here is the most trivial implementation of the library. #include <RotaryEncoder.h>; RotaryEncoder encoder(A0,A1,5,6,1000); void setup() { Serial.begin(57600); } void loop() { int enc = encoder.readEncoder(); if(enc != 0) { Serial.println(enc); } delayMicroseconds(5); } Inside the library, the code counts the number of the sequential clicks in one
A diverse group of coders, makers, artists, scientists, system security researchers creating a hacker/maker space in Atlanta Georgia. We create new and exciting projects using diverse knowledge and teach free classes on a multitude of topics for the general public.