Rework example code, fix bugs and get to compiling state. Also introduce missing logic for the Matrix code to keep track of what column is active.
This commit is contained in:
parent
8ebc1a5523
commit
690afdbce5
18 changed files with 194 additions and 26 deletions
|
@ -2,8 +2,8 @@
|
|||
#define _JOYSTICK_H_
|
||||
|
||||
#include "Button.h"
|
||||
#include "Matrix.h"
|
||||
#include <Arduino.h>
|
||||
#include <Bounce2.h>
|
||||
#include <Mux.h>
|
||||
|
||||
using namespace admux;
|
||||
|
@ -41,7 +41,7 @@ class Joystick {
|
|||
// on the Arduino Nano.
|
||||
void AddButton(uint8_t pin, ButtonType type, bool pullup=true);
|
||||
void AddMuxButton(uint8_t channel, Mux* mux, ButtonType type, bool pullup=true);
|
||||
void AddMatrixButton(uint8_t row, uint8_t col, ButtonType type, bool pullup=true);
|
||||
void AddMatrixButton(uint8_t row, uint8_t col, Matrix* matrix, ButtonType type, bool pullup=true);
|
||||
|
||||
// Add a rotary encoder. ENCODER button types allow you to treat an encoder as a momentary button or an axis (TODO)
|
||||
void AddEncoder(uint8_t pin1, uint8_t pin2, ButtonType type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue