Add connection diagram and comments
This commit is contained in:
parent
813eb71440
commit
8cdc8cca26
2 changed files with 13 additions and 0 deletions
BIN
examples/SurfaceDial/connection_diagram.png
Normal file
BIN
examples/SurfaceDial/connection_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
|
|
@ -1,8 +1,21 @@
|
|||
/*
|
||||
Copyright (c) 2017 wind-rider
|
||||
See the readme for credit to other people.
|
||||
|
||||
Surface dial example
|
||||
|
||||
Use an encoder and a button. See the connection diagram how to wire it up.
|
||||
|
||||
The encoder processing code is coming from https://www.allwinedesigns.com/blog/pocketnc-jog-wheel
|
||||
*/
|
||||
|
||||
#include "HID-Project.h"
|
||||
|
||||
// input pins for encoder channel A and channel B
|
||||
int pinA = 2;
|
||||
int pinB = 3;
|
||||
|
||||
// input pin for pushbutton
|
||||
int pinButton = 4;
|
||||
|
||||
volatile bool previousButtonValue = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue