Skip to content

Commit

Permalink
add better example
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert authored and drashna committed Oct 26, 2018
1 parent 85688e5 commit 24b3556
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ The callback functions can be inserted into your `<keyboard>.c`:
or `keymap.c`:

void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
register_code(KC_PGDN);
unregister_code(KC_PGDN);
} else {
register_code(KC_PGUP);
unregister_code(KC_PGUP);
}
}
}


## Hardware

The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.

0 comments on commit 24b3556

Please sign in to comment.