-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathREADME
More file actions
41 lines (26 loc) · 889 Bytes
/
README
File metadata and controls
41 lines (26 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
### What is this?
This is a library developed to help read the moves from
a quadrature rotary encoder.
### How to use this?
Copy the library directory into "libraries" sub-folder in your sketchbook.
More info at: http://arduino.cc/en/Reference/Libraries
And you can use something like this on your project.
#include <QuadEncoder.h>
int qe1Move=0;
QuadEncoder qe(2,4);
void setup() {
Serial.begin(9600);
}
void loop() {
qe1Move=qe.tick();
if (qe1Move=='>')
Serial.print(char(qe1Move));
else if (qe1Move=='<')
Serial.print(char(qe1Move));
}
example schematics: http://www.flickr.com/photos/28914418@N02/3755168944/sizes/m/
### License?
It's Public Domain, more at http://en.wikipedia.org/wiki/Public_domain
I'd ask that you mention my name somewhere on the project but you don't have to.
### Who did this?
Pedro Rodrigues (medecau@gmail.com) on January 2010