Compare commits

..

31 Commits

Author SHA1 Message Date
23e491b424 Change default delay to 50 ms 2021-12-22 22:08:26 +00:00
aef35f96a0 Add the ability to use a custom delay time for button presses. 2021-12-22 22:07:57 +00:00
70d7bdd3b2 Tick threshold should be a reflection of the actual change in the encoder's value. 2021-12-21 04:58:17 +00:00
82927519ce Fix off-by-one error. 2021-12-21 04:30:20 +00:00
145e383bc5 Add some logic to the encoder to only register a button press after a certain number of inputs. 2021-12-21 04:16:07 +00:00
4c5b51f7b8 Fix pulsed buttons and remove unnecessary delay from matrix buttons. 2021-11-24 16:39:00 +00:00
7cc9717e78 Add SimulIDE file for example code. 2021-11-24 01:06:53 -05:00
557aec4644 Update documentation. 2021-11-24 06:04:21 +00:00
2ce994677a Another bugfix, improve header documentation a bit. 2021-11-24 05:57:41 +00:00
a9c80c2ed5 Bug fixes. 2021-11-24 05:40:28 +00:00
690afdbce5 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. 2021-11-22 20:10:08 +00:00
8ebc1a5523 Factor pin-reading logic into a new set of classes. 2021-11-22 19:12:44 +00:00
a4f00a0a23 No longer need encoder include in Joystick. 2021-11-22 16:45:52 +00:00
1a4916fd0e For pulsed buttons, implement per-button 'timers' that independently end the pulse instead of having a 250ms delay between every single update... 2021-11-13 22:48:12 +00:00
3b69b7e960 Merge pull request 'Refactor the code to use multiple button classes.' (#4) from refactor-inheritance into main
Reviewed-on: https://git.annabunch.es/annabunches/arduino-joystick/pulls/4
2021-11-13 05:57:38 +00:00
e8a1235a95 Add analog_only option, though this is a stub for now. 2021-11-13 05:56:21 +00:00
e09c21edf1 Add some additionally debugging, fix the 'ole broken switch statement. 2021-11-09 06:11:36 +00:00
a69c2d3364 Refactor code substantially, moving buttons into separate classes and using a lot more pointers to conserve memory until it is needed. 2021-11-08 01:37:30 +00:00
346e612f65 Merge pull request 'Add rotary encoder support, simplify AddMuxButton interface.' (#3) from encoders into main
Reviewed-on: https://git.annabunch.es/annabunches/arduino-joystick/pulls/3
2021-11-07 22:51:18 +00:00
09043919de Add rotary encoder support, simplify AddMuxButton interface. 2021-11-07 22:49:14 +00:00
564f4b2b57 Merge pull request 'Add support for multiplexers' (#2) from multiplexer-support into main
Reviewed-on: https://git.annabunch.es/annabunches/arduino-joystick/pulls/2
2021-11-07 03:16:59 +00:00
fbd786fe96 Fix compile-time errors, which necessitated some refactoring of the interface. 2021-11-02 23:17:25 +00:00
5c2a2736dc Clean up examples directory. 2021-11-02 19:55:35 +00:00
d6e0648abf Add support for multiplexers. This introduces a new dependency, but c'est la vie. 2021-11-01 23:12:30 +00:00
da37d16da7 Merge pull request 'Add new button type, clean up pull-up resistor logic.' (#1) from new-button-behaviors into main
Reviewed-on: https://git.annabunch.es/annabunches/arduino-joystick/pulls/1
2021-11-01 22:29:41 +00:00
bcfd67b50d Fix behavior when using pull-up resistors. 2021-11-01 22:19:05 +00:00
3fd595c7c2 Rename variables for clarity, fix enumeration bug. 2021-11-01 22:09:11 +00:00
398668205d Fixed various errors. 2021-11-01 15:44:32 -04:00
2a35a86230 Reverting more cruft. 2021-11-01 15:39:13 -04:00
6ea6187769 Remove now-useless includes. 2021-11-01 15:38:39 -04:00
5322744f42 Revert to non-STL-using code, since that's not available when compiling for Arduino... 2021-11-01 15:38:01 -04:00
22 changed files with 1259 additions and 124 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.elf
*.hex

151
Button.cpp Normal file
View File

@ -0,0 +1,151 @@
#include "Button.h"
#include "Joystick.h"
#include <Encoder.h>
#include <Mux.h>
using namespace admux;
Button::Button(uint8_t vbutton, Reader* reader) {
this->vbutton = vbutton;
this->reader = reader;
}
void Button::ReleaseButtons(Joystick* js) {
js->ReleaseButton(vbutton);
}
PassthruButton::PassthruButton(uint8_t vbutton, Reader* reader) : Button(vbutton, reader) {
this->type = BUTTON_PASSTHRU;
}
bool PassthruButton::Update(Joystick* js) {
if (!reader->Update()) return false;
if (reader->On()) js->PressButton(vbutton);
else js->ReleaseButton(vbutton);
return true;
}
LatchedButton::LatchedButton(uint8_t vbutton, Reader* reader) : Button(vbutton, reader) {
this->type = BUTTON_LATCHED_MOMENTARY;
this->pressed = false;
}
bool LatchedButton::Update(Joystick* js) {
if (!reader->Update()) return false;
if (reader->On()) {
if (!pressed) {
js->PressButton(vbutton);
pressed = true;
} else {
js->ReleaseButton(vbutton);
pressed = false;
}
}
return true;
}
PulsedButton::PulsedButton(uint8_t vbutton, Reader* reader, uint8_t release_delay, bool double_action, bool split) : Button(vbutton, reader) {
this->release_delay = release_delay;
this->release_time1 = 0;
this->release_time2 = 0;
if (double_action) {
if (split) {
this->type = BUTTON_PULSED_DOUBLE_ACTION_SPLIT;
this->vbutton2 = vbutton + 1;
} else {
this->type = BUTTON_PULSED_DOUBLE_ACTION;
}
} else {
this->type = BUTTON_PULSED;
}
}
bool PulsedButton::Update(Joystick* js) {
if (release_time1 != 0 && millis() >= release_time1) {
js->ReleaseButton(vbutton);
release_time1 = 0;
}
if (release_time2 != 0 && millis() >= release_time2) {
js->ReleaseButton(vbutton2);
release_time2 = 0;
}
if (!reader->Update()) return false;
switch(type) {
case BUTTON_PULSED:
if (reader->On()) {
js->PressButton(vbutton);
release_time1 = millis() + release_delay;
}
break;
case BUTTON_PULSED_DOUBLE_ACTION:
js->PressButton(vbutton);
release_time1 = millis() + release_delay;
break;
case BUTTON_PULSED_DOUBLE_ACTION_SPLIT:
if (reader->On()) {
js->PressButton(vbutton);
release_time1 = millis() + release_delay;
}
else {
js->PressButton(vbutton2);
release_time2 = millis() + release_delay;
}
break;
}
return true;
}
EncoderButton::EncoderButton(uint8_t pin1, uint8_t pin2, uint8_t vbutton, int8_t tick_threshold, uint8_t release_delay) : Button(vbutton, NULL) {
this->type = ENCODER_PULSED_SPLIT;
this->vbutton2 = vbutton + 1;
this->encoder = new Encoder(pin1, pin2);
this->last_value = encoder->read();
this->release_delay = release_delay;
this->release_time1 = 0;
this->release_time2 = 0;
this->ticks = 0;
this->tick_threshold = tick_threshold;
}
bool EncoderButton::Update(Joystick* js) {
if (release_time1 != 0 && millis() >= release_time1) {
js->ReleaseButton(vbutton);
release_time1 = 0;
}
if (release_time2 != 0 && millis() >= release_time2) {
js->ReleaseButton(vbutton2);
release_time2 = 0;
}
bool changed = false;
long new_value = encoder->read();
if (new_value != last_value) {
ticks += last_value - new_value;
last_value = new_value;
}
if (ticks >= tick_threshold) {
js->PressButton(vbutton);
changed = true;
release_time1 = millis() + release_delay;
ticks = 0;
}
else if (ticks <= tick_threshold * -1) {
js->PressButton(vbutton2);
changed = true;
release_time2 = millis() + release_delay;
ticks = 0;
}
return changed;
}

81
Button.h Normal file
View File

@ -0,0 +1,81 @@
#ifndef _BUTTON_H_
#define _BUTTON_H_
#include <Encoder.h>
#include "Reader.h"
using namespace admux;
class Joystick; // forward declaration
enum ButtonType {
BUTTON_PASSTHRU = 0x1, // always use the (debounced) absolute state of the input
BUTTON_PULSED = 0x2, // on button press, send an on signal followed immediately by an off signal.
BUTTON_PULSED_DOUBLE_ACTION = 0x4, // Send a button press twice - once for press and once for release.
BUTTON_PULSED_DOUBLE_ACTION_SPLIT = 0x8, // Send two separate button presses - one button on press, another on release.
BUTTON_LATCHED_MOMENTARY = 0x10,
ENCODER_PULSED_SPLIT = 0x20 // A rotary encoder that should be treated as two different pulsed/momentary buttons, one for each direction
};
// The abstract button base class. A button must have, at a minimum:
// * a button *type* (typically automatically assigned by the constructor)
// * at least one "virtual button" - that is, a Joystick input that it controls
// * an update method.
class Button {
public:
Button(uint8_t vbutton, Reader* reader);
virtual bool Update(Joystick* js) = 0;
virtual void ReleaseButtons(Joystick* js);
ButtonType type;
protected:
uint8_t vbutton;
Reader *reader;
};
class PassthruButton : public Button {
public:
PassthruButton(uint8_t vbutton, Reader* reader);
bool Update(Joystick* js);
};
class LatchedButton : public Button {
public:
LatchedButton(uint8_t vbutton, Reader* reader);
bool Update(Joystick* js);
protected:
bool pressed;
};
class PulsedButton : public Button {
public:
PulsedButton(uint8_t vbutton, Reader* reader, uint8_t release_delay, bool double_action = false, bool split = false);
bool Update(Joystick* js);
protected:
bool double_action;
bool split;
uint8_t release_delay;
unsigned long release_time1;
unsigned long release_time2;
uint8_t vbutton2;
};
class EncoderButton : public Button {
public:
EncoderButton(uint8_t pin1, uint8_t pin2, uint8_t vbutton, int8_t tick_threshold, uint8_t release_delay);
bool Update(Joystick* js);
protected:
Encoder* encoder;
long last_value;
uint8_t vbutton2;
uint8_t release_delay;
unsigned long release_time1;
unsigned long release_time2;
int8_t ticks;
int8_t tick_threshold;
};
#endif

View File

@ -1,8 +1,11 @@
#include "Joystick.h"
#include "Button.h"
#include "Reader.h"
#include <Mux.h>
#include <Arduino.h>
#include <list>
#include <stdio.h>
using std::list;
using namespace admux;
bool operator ==(JoyReport a, JoyReport b){
for (uint8_t i=0; i < JOYSTICK_NUM_AXES; i++) {
@ -18,47 +21,57 @@ bool operator !=(JoyReport a, JoyReport b){
return !(a == b);
}
Joystick::Joystick(bool debug) {
Joystick::Joystick(uint8_t release_delay, bool debug) {
_debug = debug;
_last_button_index = 0;
_virtual_buttons = 0;
_num_axes = 0;
_have_pulsed_button = false;
_num_buttons = 0;
this->release_delay = release_delay;
for (uint8_t i=0; i < JOYSTICK_NUM_AXES; i++) {
_joyReport.axis[i] = 0;
}
for (uint8_t i=0; i < JOYSTICK_NUM_BYTES; i++) {
_joyReport.button[i] = 0;
}
}
void Joystick::Init() {
Serial.begin(115200);
delay(100);
if (_debug) Serial.println("Joystick serial communication initialized.");
}
void Joystick::AddButton(uint8_t pin, ButtonType type, bool pullup) {
uint8_t mode;
if (pullup) mode = INPUT_PULLUP;
else mode = INPUT;
Button button;
button.type = type;
button.bouncer.attach(pin, mode);
uint8_t index = _last_button_index + 1;
uint8_t increment = 1;
button.index0 = index;
if (type == BUTTON_PULSED_DOUBLE_ACTION_SPLIT) {
increment = 2;
button.index1 = index + 1;
_addButton(type, new DirectReader(pin, pullup));
}
if (_last_button_index + increment > JOYSTICK_NUM_BUTTONS) {
// todo: fail here
void Joystick::AddMuxButton(uint8_t channel, Mux* mux, ButtonType type, bool pullup) {
_addButton(type, new MuxReader(channel, mux, pullup));
}
_buttons.push_back(button);
last_button_index += increment;
void Joystick::AddMatrixButton(uint8_t row, uint8_t col, Matrix* matrix, ButtonType type, bool pullup) {
_addButton(type, new MatrixReader(row, col, matrix, pullup));
}
if (type & _BUTTON_PULSED_TYPES) _have_pulsed_button = true;
void Joystick::AddEncoder(uint8_t pin1, uint8_t pin2, int8_t tick_threshold, ButtonType type) {
Button *button;
switch (type) {
case ENCODER_PULSED_SPLIT:
// add an encoder button. _BuildButton() doesn't do everything we need, however...
button = new EncoderButton(pin1, pin2, _virtual_buttons, tick_threshold, release_delay);
_buttons[_num_buttons] = button;
_num_buttons++;
_virtual_buttons += 2;
break;
default:
if (_debug) {
Serial.print("DEBUG: Unhandled encoder type: ");
Serial.println(type);
}
}
if (_debug) Serial.println("Added an encoder.");
}
void Joystick::AddAxis(uint8_t pin) {
@ -69,20 +82,22 @@ void Joystick::AddAxis(uint8_t pin) {
void Joystick::Update() {
JoyReport oldReport = _joyReport;
for (list<Button>::iterator cursor = _buttons.begin(); cursor != _buttons.end(); cursor++) {
_UpdateButton(*cursor);
for (uint8_t i = 0; i < _num_buttons; i++) {
bool changed = _buttons[i]->Update(this);
if (changed && _debug) {
char buffer[25];
sprintf(buffer, "Button %d changed state.", i);
Serial.println(buffer);
}
}
for (int i = 0; i < _num_axes; i++) {
// TODO: implement this and also refactor it into a class or classes
for (uint8_t i = 0; i < _num_axes; i++) {
_UpdateAxis(i);
}
if (_joyReport != oldReport) {
Write();
if (_have_pulsed_button) {
_ReleasePulsedButtons();
Write();
}
}
}
@ -111,18 +126,8 @@ void Joystick::ReleaseAllButtons() {
}
}
void Joystick::_ReleasePulsedButtons() {
for (list<Button>::iterator i = _buttons.begin(); i != buttons.end(); i++) {
if (i->type & _BUTTON_PULSED_TYPES) ReleaseButton(i->index0);
if (i->type & BUTTON_PULSED_DOUBLE_ACTION_SPLIT) ReleaseButton(i->index1);
}
}
void Joystick::Write() {
if (!_debug) {
Serial.write((uint8_t *)&_joyReport, sizeof(JoyReport));
}
else {
if (_debug) {
Serial.print("DEBUG: Writing data: ");
for (uint8_t i=0; i < JOYSTICK_NUM_AXES; i++) {
Serial.print(_joyReport.axis[i]);
@ -133,46 +138,50 @@ void Joystick::Write() {
Serial.print(" ");
}
Serial.println();
}
delay(250);
return;
}
Serial.write((uint8_t *)&_joyReport, sizeof(JoyReport));
}
void Joystick::_UpdateButton(Button* button) {
bool changed = button->bouncer.update();
switch (button->type) {
case BUTTON_PASSTHRU:
if (button->bouncer.rose()) PressButton(button->index0);
else if (button->bouncer.fell()) ReleaseButton(button->index0);
break;
case BUTTON_PULSED:
if (button->bouncer.rose()) PressButton(button->index0);
break;
case BUTTON_PULSED_DOUBLE_ACTION:
if (changed) PressButton(button->index0);
break;
case BUTTON_PULSED_DOUBLE_ACTION_SPLIT:
if (button->bouncer.rose()) PressButton(button->index0);
else if (button->bouncer.fell()) PressButton(button->index1);
break;
case BUTTON_LATCHED_MOMENTARY:
if (button->bouncer.rose()) {
if !(button->pressed) {
PressButton(button->index0);
button->pressed = true;
} else {
ReleaseButton(button->index0);
button->pressed = false;
}
break;
default:
if (_debug) {
Serial.print("DEBUG: Unhandled button type: ");
Serial.println(button->type);
}
}
}
void Joystick::_UpdateAxis(uint8_t index) {
if (_debug) Serial.println("STUB: Joystick::_UpdateAxis");
}
void Joystick::_addButton(ButtonType type, Reader* reader) {
Button* button;
switch (type) {
case BUTTON_PASSTHRU:
button = new PassthruButton(_virtual_buttons, reader);
_virtual_buttons++;
break;
case BUTTON_PULSED:
button = new PulsedButton(_virtual_buttons, reader, release_delay, false, false);
_virtual_buttons++;
break;
case BUTTON_PULSED_DOUBLE_ACTION:
button = new PulsedButton(_virtual_buttons, reader, release_delay, true, false);
_virtual_buttons++;
break;
case BUTTON_PULSED_DOUBLE_ACTION_SPLIT:
button = new PulsedButton(_virtual_buttons, reader, release_delay, true, true);
_virtual_buttons += 2;
break;
case BUTTON_LATCHED_MOMENTARY:
button = new LatchedButton(_virtual_buttons, reader);
_virtual_buttons++;
break;
default:
return;
}
_buttons[_num_buttons] = button;
_num_buttons++;
if (_debug) {
char buffer[100];
sprintf(buffer, "Added button %d of type %d", _num_buttons - 1, button->type);
Serial.println(buffer);
}
}

View File

@ -1,11 +1,12 @@
#ifndef _JOYSTICK_H_
#define _JOYSTICK_H_
#include "Button.h"
#include "Matrix.h"
#include <Arduino.h>
#include <Bounce2.h>
#include <list>
#include <Mux.h>
using std::list;
using namespace admux;
// If you're using the arduino-big-joystick firmware, these numbers can't be
// changed. If you're writing your own Report Descriptor, tune these to match by
@ -18,65 +19,66 @@ using std::list;
#endif
#define JOYSTICK_NUM_BYTES (JOYSTICK_NUM_BUTTONS+7)/8
enum ButtonType {
BUTTON_PASSTHRU = 0x1, // always use the (debounced) absolute state of the input
BUTTON_PULSED = 0x2, // on button press, send an on signal followed immediately by an off signal.
BUTTON_PULSED_DOUBLE_ACTION = 0x4, // Send a button press twice - once for press and once for release.
BUTTON_PULSED_DOUBLE_ACTION_SPLIT = 0x8, // Send two separate button presses - one button on press, another on release.
BUTTON_LATCHED_MOMENTARY = 0x10
};
struct JoyReport {
int16_t axis[JOYSTICK_NUM_AXES];
uint8_t button[JOYSTICK_NUM_BYTES];
};
struct Button {
ButtonType type;
Bounce bouncer;
uint8_t index0;
uint8_t index1; // only used by BUTTON_PULSED_DOUBLE_ACTION_SPLIT
bool pressed = false; // only used by BUTTON_LATCHED_MOMENTARY
bool inverted = false; // if true, send button press on release and vice versa.
};
bool operator ==(JoyReport a, JoyReport b);
bool operator !=(JoyReport a, JoyReport b);
class Joystick {
public:
Joystick(bool debug=false);
Joystick(uint8_t release_delay = 50, bool debug = false);
void Init();
void Update();
void AddButton(uint8_t pin, ButtonType type, bool pullup=true);
void AddAxis(uint8_t pin); // Axes don't actually work yet!
// Use these functions to add a button to the joystick.
// Button types are documented in the ButtonType enum. See Button.h for details.
// If 'pullup' is true, your button should connect the pin to ground. (also be sure that your board supports INPUT_PULLUP on that pin)
// If 'pullup' is false, your button should connect the pin to VCC.
// Public access to these functions is deprecated and they may become private in a future
// version. Prefer the above API instead.
void SetAxis(uint8_t axis, int16_t value);
// Add a button connected directly to a pin on the microcontroller.
void AddButton(uint8_t pin, ButtonType type, bool pullup=true);
// Add a button connected to a channel on a Multiplexer.
// FIXME: This doesn't currently work!
void AddMuxButton(uint8_t channel, Mux* mux, ButtonType type, bool pullup=true);
// Add a button connected to a scan matrix.
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, int8_t tick_threshold, ButtonType type);
// Add an analog axis to the joystick. THIS METHOD IS NOT CURRENTLY TESTED OR SUPPORTED. It might work, but probably not.
void AddAxis(uint8_t pin);
// These members should not be used by end users; todo: remember how friend classes work
void PressButton(uint8_t button);
void ReleaseButton(uint8_t button);
private:
void SetAxis(uint8_t axis, int16_t value);
void ReleaseAllButtons();
void Write();
private:
void _ReleasePulsedButtons();
void _UpdateButton(uint8_t index);
void _UpdateAxis(uint8_t index);
list<Button> _buttons;
uint8_t _last_button_index;
bool _have_pulsed_button;
void _addButton(ButtonType type, Reader* reader);
Button* _buttons[JOYSTICK_NUM_BUTTONS];
uint8_t _num_buttons;
uint8_t _virtual_buttons; // a single user-defined button can have multiple virtual buttons.
uint8_t _axes[JOYSTICK_NUM_AXES];
uint8_t _num_axes;
JoyReport _joyReport;
bool _debug;
uint8_t release_delay;
};
// Internal use only.
#define _BUTTON_PULSED_TYPES (BUTTON_PULSED | BUTTON_PULSED_DOUBLE_ACTION | BUTTON_PULSED_DOUBLE_ACTION_SPLIT)
#endif

32
Matrix.cpp Normal file
View File

@ -0,0 +1,32 @@
#include "Matrix.h"
Matrix::Matrix(uint8_t* columns, uint8_t num_columns, bool inverted) {
this->active_pin = 255; // sentinel value, highest possible 8-bit number
this->inverted = inverted;
for (uint8_t i = 0; i < num_columns; i++) {
pinMode(columns[i], OUTPUT);
_disable(columns[i]);
}
}
void Matrix::Activate(uint8_t pin) {
if (pin == active_pin) return;
if (active_pin != 255) {
_disable(active_pin);
}
_enable(pin);
active_pin = pin;
}
void Matrix::_enable(uint8_t pin) {
if (inverted) digitalWrite(pin, LOW);
else digitalWrite(pin, HIGH);
}
void Matrix::_disable(uint8_t pin) {
if (inverted) digitalWrite(pin, HIGH);
else digitalWrite(pin, LOW);
}

22
Matrix.h Normal file
View File

@ -0,0 +1,22 @@
// A state-keeping class used with MatrixReader. Keeps track of which column is active,
// switches between them.
#ifndef _MATRIX_H_
#define _MATRIX_H_
#include <Arduino.h>
class Matrix {
public:
Matrix(uint8_t *columns, uint8_t num_columns, bool inverted=true);
void Activate(uint8_t column);
private:
void _enable(uint8_t pin);
void _disable(uint8_t pin);
uint8_t active_pin;
bool inverted;
};
#endif

54
Reader.cpp Normal file
View File

@ -0,0 +1,54 @@
#include "Reader.h"
Reader::Reader(bool inverted) {
this->inverted = inverted;
}
bool Reader::On() {
bool state = bouncer.rose();
if (inverted) state = bouncer.fell();
return state;
}
uint8_t Reader::getMode(bool pullup) {
if (pullup) return INPUT_PULLUP;
return INPUT;
}
DirectReader::DirectReader(uint8_t pin, bool inverted) : Reader(inverted) {
uint8_t mode = getMode(inverted);
this->bouncer.attach(pin, mode);
}
bool DirectReader::Update() {
return bouncer.update();
}
MuxReader::MuxReader(uint8_t channel, Mux* mux, bool inverted) : Reader(inverted) {
uint8_t mode = getMode(inverted);
this->bouncer.attach(mux->signalPin().pin, mode);
this->channel = channel;
}
bool MuxReader::Update() {
mux->channel(channel);
return bouncer.update();
}
MatrixReader::MatrixReader(uint8_t row, uint8_t col, Matrix* matrix, bool inverted) : Reader(inverted) {
uint8_t mode = getMode(inverted);
this->bouncer.attach(row, mode);
this->col = col;
this->matrix = matrix;
}
bool MatrixReader::Update() {
matrix->Activate(col);
bool changed = bouncer.update();
return changed;
}

65
Reader.h Normal file
View File

@ -0,0 +1,65 @@
// "Readers" represent different methods for reading the state of a pin.
// They also include debouncing logic using the Bounce2 library, when appropriate.
#ifndef _READER_H_
#define _READER_H_
#include "Matrix.h"
#include <Arduino.h>
#include <Bounce2.h>
#include <Mux.h>
using namespace admux;
// The abstract base class - a very simple interface
class Reader {
public:
Reader(bool inverted);
virtual bool Update() = 0; // should return true if the state of the pin has changed
bool On();
protected:
uint8_t getMode(bool pullup);
Bounce bouncer;
bool inverted;
};
// A standard reader; the button is connected directly to a switch
class DirectReader : public Reader {
public:
DirectReader(uint8_t pin, bool inverted = true);
bool Update();
bool On();
};
// The button is connected to a Multiplexer channel
class MuxReader : public Reader {
public:
MuxReader(uint8_t channel, Mux* mux, bool inverted = true);
bool Update();
bool On();
protected:
uint8_t channel;
Mux * mux;
};
// The button is connected via a scan matrix
// "row" should always be the input, with "col" the selecter.
class MatrixReader : public Reader {
public:
MatrixReader(uint8_t row, uint8_t col, Matrix* matrix, bool inverted = true);
bool Update();
bool On();
protected:
uint8_t col;
Matrix* matrix;
};
#endif

View File

@ -2,17 +2,32 @@
This is a library that builds and sends USB HID Joystick reports, making it easy to build USB Joysticks with Arduino.
## Dependencies
* Your Arduino's USB communication chip must be programmed with the arduino-big-joystick firmware (or similar). See <https://github.com/harlequin-tech/arduino-usb> for more info.
* After uploading your sketch, your Arduino's USB communication chip will need to be programmed with the arduino-big-joystick firmware (or similar). See <https://github.com/harlequin-tech/arduino-usb> for more info.
* The Bounce2 library, available at <https://github.com/thomasfredericks/Bounce2>.
* The Analog-Digital Multiplexers library, available at <https://github.com/stechio/arduino-ad-mux-lib>.
## Installation
1. Put the arduino-joystick directory into your Arduino libraries directory.
2. Make sure Bounce2 is installed!
1. Install dependencies as above, or if using `arduino-cli`, with:
arduino-cli lib install Bounce2
arduino-cli lib install "Analog-Digital Multiplexers"
2. Put the arduino-joystick directory into your Arduino libraries directory.
## Compiling and running the example code via SimulIDE
1. Run `make` from the `example` directory.
2. Load `example.simu` in SimulIDE.
3. Right-click on the Arduino component, and click "load firmware". Select the `.hex` file created in the `example/` directory.
4. Click the red `Power Circuit` icon at the top of the SimulIDE window.
## Usage
1. In your arduino sketch, add the includes:
#include <Bounce2.h>
1. In your arduino sketch, add the include:
#include <Joystick.h>
2. Create a Joystick object:
Joystick joystick;
3. Add buttons and axes in setup() with Joystick::AddButton(), and call Joystick::Update() in loop(). That's it!
Joystick joystick(true);
3. Add buttons and axes in `setup()` with the `Add*` functions from `Joystick.h`. Call `joystick.Update()` in your `loop()` function. Also call `joystick.Init()` during `setup()`.
4. Upload the sketch, connect to the serial monitor (at 115200 baud) and test the buttons.
5. Set the joystick's `debug` parameter to `false` and re-upload the sketch. The arduino will NOT work in joystick mode with debug set to `true`!
6. Flash the `arduino-big-joystick` firmware onto the USB Controller.
### Advanced usage: multiplexers, matrices
If you need more buttons than your board has pins, this library supports keyboard-style scan matrices as well as multiplexers. **(FIXME: multiplexers aren't working yet)** See the example sketch in the `example/` directory for usage details. Note that, for matrices, the *rows* are the inputs that will be read, and the *columns* are the outputs that will sink the current. Current should flow (via diodes) from the rows to the columns. See the `example.simu` SimulIDE file for an example circuit.

8
example/Makefile Normal file
View File

@ -0,0 +1,8 @@
TARGET_BOARD=arduino:avr:uno
COM_PORT=/dev/ttyACM0
build:
arduino-cli compile -b ${TARGET_BOARD}
upload:
arduino-cli upload -b ${TARGET_BOARD} -p ${COM_PORT}

107
example/example.ino Normal file
View File

@ -0,0 +1,107 @@
// An example sketch using the joystick library, demonstrating recommended usage
// of all features.
// This code loads the sketch in debug mode. Connect to the Arduino's serial port at 115200 baud to read the output.
#include <Joystick.h>
#include <Matrix.h>
#include <Mux.h>
using namespace admux;
// Always use defines to match your pins to their logical wiring
// pins 2 and 3 are attached to a rotary encoder
#define ENCODER 2,3
// these buttons are attached directly to Arduino input pins
#define BTN1 4
#define BTN2 5
#define BTN3 6
#define BTN4 7
#define BTN5 A0
// pins 8-13 are attached to a 3x3 scanning input matrix. Pins 8-10 are the row pins, 11-13 are the column pins.
#define MATRIX1 8,11
#define MATRIX2 9,11
#define MATRIX3 10,11
#define MATRIX4 8,12
#define MATRIX5 9,12
#define MATRIX6 10,12
#define MATRIX7 8,13
#define MATRIX8 9,13
#define MATRIX9 10,13
// A multiplexer is attached to pins A1-A5
#define MUX_SIG A1 // the multiplexer's signal pin is on Analog 1
#define MUX_ADDR A2,A3,A4,A5 // the multiplexer's address pins are A2-A5, in that order
// These are 3 buttons attached to the multiplexer channels
#define MUX_BTN1 0
#define MUX_BTN2 1
#define MUX_BTN3 2
bool debug = true;
Joystick js(250, debug);
void setup() {
js.Init();
Serial.println("Adding encoder.");
js.AddEncoder(ENCODER, 3, ENCODER_PULSED_SPLIT);
// Different types of button programming are available. BUTTON_PASSTHRU simply passes on the button's
// real state, and will be the most common, but you can also change how the button works in software like so...
Serial.println("Adding directly connected buttons.");
// With BUTTON_PULSED, no matter how long the button stays held down, it will only send a button press for 250ms
// then deactivate until pressed again.
js.AddButton(BTN1, BUTTON_PULSED);
// BUTTON_PULSED_DOUBLE_ACTION does the same thing, but sends a *second* 250ms press when the button is deactivated
// This is great for an on-off toggle switch that should send an "event" in both directions.
js.AddButton(BTN2, BUTTON_PULSED_DOUBLE_ACTION);
// BUTTON_PULSED_DOUBLE_ACTION_SPLIT is just like the above, but it sends *different* button presses for the "on"
// and "off" states.
js.AddButton(BTN3, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
// BUTTON_LATCHED_MOMENTARY lets you turn a momentary pushbutton into a toggle switch.
// One press will "press and hold" the button. The next press releases the button.
js.AddButton(BTN4, BUTTON_LATCHED_MOMENTARY);
// This is a standard PASSTHRU button. It simply mirrors the actual state of the physical button.
js.AddButton(BTN5, BUTTON_PASSTHRU);
// One way to get more room for inputs is to use a scan matrix.
// See http://blog.komar.be/how-to-make-a-keyboard-the-matrix/ for a very detailed discussion of how these work.
// This is a 3x3 example, so we can get 9 buttons out of 6 inputs.
// For faster read results, always add buttons so that buttons with the same *column* are grouped together.
Serial.println("Adding matrix.");
uint8_t cols[] = {11, 12, 13};
Matrix* matrix = new Matrix(cols, 3);
js.AddMatrixButton(MATRIX1, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX2, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX3, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX4, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX5, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX6, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX7, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX8, matrix, BUTTON_PASSTHRU);
js.AddMatrixButton(MATRIX9, matrix, BUTTON_PASSTHRU);
// another way to get more room for our inputs, this code adds a 16-channel multiplexer.
// It only attaches 3 buttons, but could attach up to channel 15.
Serial.println("Adding multiplexer.");
Mux* mux = new Mux(Pin(MUX_SIG, INPUT_PULLUP, PinType::Digital), Pinset(MUX_ADDR));
js.AddMuxButton(MUX_BTN1, mux, BUTTON_PASSTHRU);
js.AddMuxButton(MUX_BTN2, mux, BUTTON_PASSTHRU);
js.AddMuxButton(MUX_BTN3, mux, BUTTON_PASSTHRU);
Serial.println("Example joystick fully configured.");
}
void loop() {
// check all the button states and send any changes
js.Update();
}

459
example/example.simu Executable file
View File

@ -0,0 +1,459 @@
<circuit reactStep="50" Simu_Step_nS="1000" animate="1" type="simulide_0.4" Speed_per="100" noLinAcc="5" Speed_sps="1000000">
Unique Id: Ground-812:
Circuit Id: Ground-812
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-16" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Ground-812" labelx="-16" boardRot="-1000000" objectName="Ground-812" rotation="0" y="-76" boardPos="-1e+06,-1e+06" labely="8" itemtype="Ground" vflip="1" mainComp="false"/>
Unique Id: Push-809:
Circuit Id: Push-809
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-56" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-809" labelx="-16" boardRot="-1000000" objectName="Push-809" rotation="0" Norm_Close="false" y="-116" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Node-803:
Circuit Id: Node-803
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-380" valLabely="0" circRot="nan" labelrot="0" id="Node-803" labelx="-16" boardRot="-1000000" objectName="Node-803" rotation="0" y="24" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-593:
Circuit Id: Node-593
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-432" valLabely="0" circRot="nan" labelrot="0" id="Node-593" labelx="-16" boardRot="-1000000" objectName="Node-593" rotation="0" y="16" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-590:
Circuit Id: Node-590
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-488" valLabely="0" circRot="1.0236025586772652e-306" labelrot="0" id="Node-590" labelx="-16" boardRot="-1000000" objectName="Node-590" rotation="0" y="16" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-576:
Circuit Id: Node-576
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-380" valLabely="0" circRot="nan" labelrot="0" id="Node-576" labelx="-16" boardRot="-1000000" objectName="Node-576" rotation="0" y="-88" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-570:
Circuit Id: Node-570
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-432" valLabely="0" circRot="3.6758708583790915e+228" labelrot="0" id="Node-570" labelx="-16" boardRot="-1000000" objectName="Node-570" rotation="0" y="-88" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-564:
Circuit Id: Node-564
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-488" valLabely="0" circRot="0" labelrot="0" id="Node-564" labelx="-16" boardRot="-1000000" objectName="Node-564" rotation="0" y="-84" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-192:
Circuit Id: Node-192
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-472" valLabely="0" circRot="nan" labelrot="0" id="Node-192" labelx="-16" boardRot="-1000000" objectName="Node-192" rotation="0" y="-348" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-189:
Circuit Id: Node-189
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-472" valLabely="0" circRot="-2.9681990884966918e-197" labelrot="0" id="Node-189" labelx="-16" boardRot="-1000000" objectName="Node-189" rotation="0" y="-368" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-186:
Circuit Id: Node-186
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-472" valLabely="0" circRot="1.0236025586772652e-306" labelrot="0" id="Node-186" labelx="-16" boardRot="-1000000" objectName="Node-186" rotation="0" y="-328" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Ground-180:
Circuit Id: Ground-180
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-508" valLabely="0" circRot="nan" labelrot="0" id="Ground-180" labelx="-16" boardRot="-1000000" objectName="Ground-180" rotation="0" y="-288" boardPos="-1e+06,-1e+06" labely="8" itemtype="Ground" vflip="1" mainComp="false"/>
Unique Id: Push-174:
Circuit Id: Push-174
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-420" Poles="1" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Push-174" labelx="-16" boardRot="-1000000" objectName="Push-174" rotation="0" Norm_Close="false" y="-292" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-173:
Circuit Id: Push-173
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-420" Poles="1" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Push-173" labelx="-16" boardRot="-1000000" objectName="Push-173" rotation="0" Norm_Close="false" y="-404" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-172:
Circuit Id: Push-172
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-420" Poles="1" valLabely="0" circRot="-2.9681990884966918e-197" labelrot="0" id="Push-172" labelx="-16" boardRot="-1000000" objectName="Push-172" rotation="0" Norm_Close="false" y="-368" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-171:
Circuit Id: Push-171
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-420" Poles="1" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Push-171" labelx="-16" boardRot="-1000000" objectName="Push-171" rotation="0" Norm_Close="false" y="-328" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Node-168:
Circuit Id: Node-168
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" valLabely="0" circRot="nan" labelrot="0" id="Node-168" labelx="-16" boardRot="-1000000" objectName="Node-168" rotation="0" y="-164" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-165:
Circuit Id: Node-165
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Node-165" labelx="-16" boardRot="-1000000" objectName="Node-165" rotation="0" y="-164" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Diode-124:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-444" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-124" rotation="90" y="-212" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-121:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-388" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-121" rotation="90" y="-212" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-120:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-500" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-120" rotation="90" y="-104" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-117:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-448" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-117" rotation="90" y="-104" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-116:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-388" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-116" rotation="90" y="-104" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-113:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-500" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-113" rotation="90" y="-12" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-112:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-448" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-112" rotation="90" y="-8" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-109:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-392" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-109" rotation="90" y="-8" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Diode-108:
Circuit Id: Diode-108
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" Threshold="0.69999999999999996" x="-500" valLabely="0" circRot="-2.9681990884966918e-197" Zener_Volt="0" labelrot="0" id="Diode-108" labelx="-16" boardRot="-1000000" objectName="Diode-108" rotation="90" y="-208" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Diode" vflip="1" mainComp="false"/>
Unique Id: Node-105:
Circuit Id: Node-105
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" valLabely="0" circRot="0" labelrot="0" id="Node-105" labelx="-16" boardRot="-1000000" objectName="Node-105" rotation="0" y="-60" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-102:
Circuit Id: Node-102
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" valLabely="0" circRot="0" labelrot="0" id="Node-102" labelx="-16" boardRot="-1000000" objectName="Node-102" rotation="0" y="-60" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-94:
Circuit Id: Node-94
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" valLabely="0" circRot="nan" labelrot="0" id="Node-94" labelx="-16" boardRot="-1000000" objectName="Node-94" rotation="0" y="-268" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-88:
Circuit Id: Node-88
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" valLabely="0" circRot="0" labelrot="0" id="Node-88" labelx="-16" boardRot="-1000000" objectName="Node-88" rotation="0" y="-268" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Push-80:
Circuit Id: Push-63
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-516" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-63" labelx="-16" boardRot="-1000000" objectName="Push-80" rotation="0" Norm_Close="false" y="-44" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-79:
Circuit Id: Push-65
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-408" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-65" labelx="-16" boardRot="-1000000" objectName="Push-79" rotation="0" Norm_Close="false" y="-44" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-78:
Circuit Id: Push-64
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-464" Poles="1" valLabely="0" circRot="-5.4861292972962881e+303" labelrot="0" id="Push-64" labelx="-16" boardRot="-1000000" objectName="Push-78" rotation="0" Norm_Close="false" y="-44" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-68:
Circuit Id: Push-65
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-408" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-65" labelx="-16" boardRot="-1000000" objectName="Push-68" rotation="0" Norm_Close="false" y="-140" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-67:
Circuit Id: Push-64
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-464" Poles="1" valLabely="0" circRot="-5.4861292972962881e+303" labelrot="0" id="Push-64" labelx="-16" boardRot="-1000000" objectName="Push-67" rotation="0" Norm_Close="false" y="-140" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-66:
Circuit Id: Push-63
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-516" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-63" labelx="-16" boardRot="-1000000" objectName="Push-66" rotation="0" Norm_Close="false" y="-140" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-65:
Circuit Id: Push-65
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-408" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-65" labelx="-16" boardRot="-1000000" objectName="Push-65" rotation="0" Norm_Close="false" y="-240" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-64:
Circuit Id: Push-64
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-464" Poles="1" valLabely="0" circRot="-5.4861292972962881e+303" labelrot="0" id="Push-64" labelx="-16" boardRot="-1000000" objectName="Push-64" rotation="0" Norm_Close="false" y="-240" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-63:
Circuit Id: Push-63
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="-516" Poles="1" valLabely="0" circRot="0" labelrot="0" id="Push-63" labelx="-16" boardRot="-1000000" objectName="Push-63" rotation="0" Norm_Close="false" y="-240" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Arduino Uno-1:
Circuit Id: Arduino Uno-1
<item valLabRot="0" hflip="1" Name="arduinoUno" Program="example.arduino.avr.uno.hex" circPos="0,0" Show_id="true" Init_gdb="false" valLabelx="0" Auto_Load="false" x="-304" valLabely="0" circRot="3.2799144730471328e-316" labelrot="0" varList="ACSR,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," Mhz="16" id="Arduino Uno-1" labelx="100" boardRot="-1000000" Logic_Symbol="false" objectName="Arduino Uno-1" rotation="0" y="-300" boardPos="-1e+06,-1e+06" eeprom="255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255" labely="-21" itemtype="Arduino" vflip="1" mainComp="false"/>
Unique Id: 74HC4067-612:
Circuit Id: 74HC4067-612
<item valLabRot="-90" hflip="1" Name="74HC4067" circPos="0,0" Show_id="true" valLabelx="13" x="-72" valLabely="52" circRot="4.7750804361479468e-316" labelrot="0" id="74HC4067-612" labelx="0" boardRot="-1000000" Logic_Symbol="true" BoardId="" objectName="74HC4067-612" rotation="0" y="-288" boardPos="-1e+06,-1e+06" labely="-20" itemtype="Subcircuit" vflip="1" mainComp="false"/>
Unique Id: Push-687:
Circuit Id: Push-687
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="36" Poles="1" valLabely="0" circRot="6.470495591940174e+170" labelrot="0" id="Push-687" labelx="-16" boardRot="-1000000" objectName="Push-687" rotation="0" Norm_Close="false" y="-280" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-688:
Circuit Id: Push-688
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="36" Poles="1" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Push-688" labelx="-16" boardRot="-1000000" objectName="Push-688" rotation="0" Norm_Close="false" y="-232" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Push-689:
Circuit Id: Push-689
<item valLabRot="0" hflip="1" Key="" circPos="0,0" Show_id="false" valLabelx="0" x="36" Poles="1" valLabely="0" circRot="6.870167592054736e+228" labelrot="0" id="Push-689" labelx="-16" boardRot="-1000000" objectName="Push-689" rotation="0" Norm_Close="false" y="-184" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Push" vflip="1" mainComp="false"/>
Unique Id: Ground-690:
Circuit Id: Ground-690
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="92" valLabely="0" circRot="-1.6841244377622154e-310" labelrot="0" id="Ground-690" labelx="-16" boardRot="-1000000" objectName="Ground-690" rotation="0" y="-140" boardPos="-1e+06,-1e+06" labely="8" itemtype="Ground" vflip="1" mainComp="false"/>
Unique Id: Node-696:
Circuit Id: Node-696
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="92" valLabely="0" circRot="-5.4861292803319049e+303" labelrot="0" id="Node-696" labelx="-16" boardRot="-1000000" objectName="Node-696" rotation="0" y="-232" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: Node-699:
Circuit Id: Node-699
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="92" valLabely="0" circRot="-2.1730297897437183e-310" labelrot="0" id="Node-699" labelx="-16" boardRot="-1000000" objectName="Node-699" rotation="0" y="-184" boardPos="-1e+06,-1e+06" labely="-24" itemtype="Node" vflip="1" mainComp="false"/>
Unique Id: SerialTerm-161:
Circuit Id: SerialTerm-161
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" Mcu_Uart="1" sizey="896" valLabelx="0" x="-304" posy="77" posx="1187" valLabely="0" circRot="0" labelrot="0" Mcu_Id="Arduino Uno-1" id="SerialTerm-161" labelx="-16" boardRot="-1000000" objectName="SerialTerm-161" rotation="0" y="-300" boardPos="-1e+06,-1e+06" labely="-24" itemtype="SerialTerm" sizex="715" vflip="1" mainComp="false"/>
Unique Id: Connector-89:
Circuit Id: Connector-89
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-88-2" enodeid="Circ_eNode-769" valLabely="0" circRot="0" labelrot="0" id="Connector-89" labelx="-16" boardRot="-1000000" objectName="Connector-89" rotation="0" y="-268" boardPos="-1e+06,-1e+06" endpinid="Push-63-pinP0" labely="-24" itemtype="Connector" pointList="-480,-268,-532,-268,-532,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-90:
Circuit Id: Connector-90
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-88-1" enodeid="Circ_eNode-769" valLabely="0" circRot="0" labelrot="0" id="Connector-90" labelx="-16" boardRot="-1000000" objectName="Connector-90" rotation="0" y="-268" boardPos="-1e+06,-1e+06" endpinid="Push-64-pinP0" labely="-24" itemtype="Connector" pointList="-480,-268,-480,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-95:
Circuit Id: Connector-95
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-94-2" enodeid="Circ_eNode-769" valLabely="0" circRot="0" labelrot="0" id="Connector-95" labelx="-16" boardRot="-1000000" objectName="Connector-95" rotation="0" y="-268" boardPos="-1e+06,-1e+06" endpinid="Node-88-0" labely="-24" itemtype="Connector" pointList="-424,-268,-480,-268" vflip="1" mainComp="false"/>
Unique Id: Connector-96:
Circuit Id: Connector-96
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-94-1" enodeid="Circ_eNode-769" valLabely="0" circRot="0" labelrot="0" id="Connector-96" labelx="-16" boardRot="-1000000" objectName="Connector-96" rotation="0" y="-268" boardPos="-1e+06,-1e+06" endpinid="Push-65-pinP0" labely="-24" itemtype="Connector" pointList="-424,-268,-424,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-103:
Circuit Id: Connector-103
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-102-2" enodeid="Circ_eNode-770" valLabely="0" circRot="nan" labelrot="0" id="Connector-103" labelx="-16" boardRot="-1000000" objectName="Connector-103" rotation="0" y="-60" boardPos="-1e+06,-1e+06" endpinid="Push-80-pinP0" labely="-24" itemtype="Connector" pointList="-480,-60,-532,-60,-532,-44" vflip="1" mainComp="false"/>
Unique Id: Connector-104:
Circuit Id: Connector-104
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-102-1" enodeid="Circ_eNode-770" valLabely="0" circRot="0" labelrot="0" id="Connector-104" labelx="-16" boardRot="-1000000" objectName="Connector-104" rotation="0" y="-60" boardPos="-1e+06,-1e+06" endpinid="Push-78-pinP0" labely="-24" itemtype="Connector" pointList="-480,-60,-480,-44" vflip="1" mainComp="false"/>
Unique Id: Connector-106:
Circuit Id: Connector-106
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-105-2" enodeid="Circ_eNode-770" valLabely="0" circRot="0" labelrot="0" id="Connector-106" labelx="-16" boardRot="-1000000" objectName="Connector-106" rotation="0" y="-60" boardPos="-1e+06,-1e+06" endpinid="Node-102-0" labely="-24" itemtype="Connector" pointList="-424,-60,-480,-60" vflip="1" mainComp="false"/>
Unique Id: Connector-107:
Circuit Id: Connector-107
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-105-1" enodeid="Circ_eNode-770" valLabely="0" circRot="0" labelrot="0" id="Connector-107" labelx="-16" boardRot="-1000000" objectName="Connector-107" rotation="0" y="-60" boardPos="-1e+06,-1e+06" endpinid="Push-79-pinP0" labely="-24" itemtype="Connector" pointList="-424,-60,-424,-44" vflip="1" mainComp="false"/>
Unique Id: Connector-166:
Circuit Id: Connector-166
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-165-2" enodeid="Circ_eNode-771" valLabely="0" circRot="0" labelrot="0" id="Connector-166" labelx="-16" boardRot="-1000000" objectName="Connector-166" rotation="0" y="-164" boardPos="-1e+06,-1e+06" endpinid="Push-66-pinP0" labely="-24" itemtype="Connector" pointList="-480,-164,-532,-164,-532,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-167:
Circuit Id: Connector-167
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-480" startpinid="Node-165-1" enodeid="Circ_eNode-771" valLabely="0" circRot="0" labelrot="0" id="Connector-167" labelx="-16" boardRot="-1000000" objectName="Connector-167" rotation="0" y="-164" boardPos="-1e+06,-1e+06" endpinid="Push-67-pinP0" labely="-24" itemtype="Connector" pointList="-480,-164,-480,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-169:
Circuit Id: Connector-169
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-168-2" enodeid="Circ_eNode-771" valLabely="0" circRot="0" labelrot="0" id="Connector-169" labelx="-16" boardRot="-1000000" objectName="Connector-169" rotation="0" y="-164" boardPos="-1e+06,-1e+06" endpinid="Node-165-0" labely="-24" itemtype="Connector" pointList="-424,-164,-480,-164" vflip="1" mainComp="false"/>
Unique Id: Connector-170:
Circuit Id: Connector-170
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-424" startpinid="Node-168-1" enodeid="Circ_eNode-771" valLabely="0" circRot="0" labelrot="0" id="Connector-170" labelx="-16" boardRot="-1000000" objectName="Connector-170" rotation="0" y="-164" boardPos="-1e+06,-1e+06" endpinid="Push-68-pinP0" labely="-24" itemtype="Connector" pointList="-424,-164,-424,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-177:
Circuit Id: Connector-177
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PD6" enodeid="Circ_eNode-773" valLabely="0" circRot="0" labelrot="0" id="Connector-177" labelx="-16" boardRot="-1000000" objectName="Connector-177" rotation="0" y="-236" boardPos="-1e+06,-1e+06" endpinid="Push-171-switch0pinN" labely="-24" itemtype="Connector" pointList="-296,-236,-336,-236,-336,-328,-404,-328" vflip="1" mainComp="false"/>
Unique Id: Connector-178:
Circuit Id: Connector-178
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PD5" enodeid="Circ_eNode-774" valLabely="0" circRot="0" labelrot="0" id="Connector-178" labelx="-16" boardRot="-1000000" objectName="Connector-178" rotation="0" y="-244" boardPos="-1e+06,-1e+06" endpinid="Push-172-switch0pinN" labely="-24" itemtype="Connector" pointList="-296,-244,-332,-244,-332,-368,-404,-368" vflip="1" mainComp="false"/>
Unique Id: Connector-179:
Circuit Id: Connector-179
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PD4" enodeid="Circ_eNode-775" valLabely="0" circRot="0" labelrot="0" id="Connector-179" labelx="-16" boardRot="-1000000" objectName="Connector-179" rotation="0" y="-252" boardPos="-1e+06,-1e+06" endpinid="Push-173-switch0pinN" labely="-24" itemtype="Connector" pointList="-296,-252,-328,-252,-328,-404,-404,-404" vflip="1" mainComp="false"/>
Unique Id: Connector-182:
Circuit Id: Connector-182
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-436" startpinid="Push-171-pinP0" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-182" labelx="-16" boardRot="-1000000" objectName="Connector-182" rotation="0" y="-328" boardPos="-1e+06,-1e+06" endpinid="Node-186-0" labely="-24" itemtype="Connector" pointList="-436,-328,-472,-328" vflip="1" mainComp="false"/>
Unique Id: Connector-185:
Circuit Id: Connector-185
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-436" startpinid="Push-172-pinP0" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-185" labelx="-16" boardRot="-1000000" objectName="Connector-185" rotation="0" y="-368" boardPos="-1e+06,-1e+06" endpinid="Node-189-0" labely="-24" itemtype="Connector" pointList="-436,-368,-472,-368" vflip="1" mainComp="false"/>
Unique Id: Connector-188:
Circuit Id: Connector-188
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-436" startpinid="Push-173-pinP0" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-188" labelx="-16" boardRot="-1000000" objectName="Connector-188" rotation="0" y="-404" boardPos="-1e+06,-1e+06" endpinid="Node-189-1" labely="-24" itemtype="Connector" pointList="-436,-404,-472,-404,-472,-368" vflip="1" mainComp="false"/>
Unique Id: Connector-190:
Circuit Id: Connector-190
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-472" startpinid="Node-189-2" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-190" labelx="-16" boardRot="-1000000" objectName="Connector-190" rotation="0" y="-368" boardPos="-1e+06,-1e+06" endpinid="Node-192-0" labely="-24" itemtype="Connector" pointList="-472,-368,-472,-348" vflip="1" mainComp="false"/>
Unique Id: Connector-181:
Circuit Id: Connector-181
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-436" startpinid="Push-174-pinP0" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-181" labelx="-16" boardRot="-1000000" objectName="Connector-181" rotation="0" y="-292" boardPos="-1e+06,-1e+06" endpinid="Node-186-2" labely="-24" itemtype="Connector" pointList="-436,-292,-472,-292,-472,-328" vflip="1" mainComp="false"/>
Unique Id: Connector-191:
Circuit Id: Connector-191
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-508" startpinid="Ground-180-Gnd" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-191" labelx="-16" boardRot="-1000000" objectName="Connector-191" rotation="0" y="-304" boardPos="-1e+06,-1e+06" endpinid="Node-192-1" labely="-24" itemtype="Connector" pointList="-508,-304,-508,-348,-472,-348" vflip="1" mainComp="false"/>
Unique Id: Connector-193:
Circuit Id: Connector-193
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-472" startpinid="Node-192-2" enodeid="Circ_eNode-776" valLabely="0" circRot="0" labelrot="0" id="Connector-193" labelx="-16" boardRot="-1000000" objectName="Connector-193" rotation="0" y="-348" boardPos="-1e+06,-1e+06" endpinid="Node-186-1" labely="-24" itemtype="Connector" pointList="-472,-348,-472,-328" vflip="1" mainComp="false"/>
Unique Id: Connector-553:
Circuit Id: Connector-553
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-500" startpinid="Diode-113-lPin" enodeid="Circ_eNode-777" valLabely="0" circRot="0" labelrot="0" id="Connector-553" labelx="-16" boardRot="-1000000" objectName="Connector-553" rotation="0" y="-28" boardPos="-1e+06,-1e+06" endpinid="Push-80-switch0pinN" labely="-24" itemtype="Connector" pointList="-500,-28,-500,-44" vflip="1" mainComp="false"/>
Unique Id: Connector-554:
Circuit Id: Connector-554
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-500" startpinid="Diode-120-lPin" enodeid="Circ_eNode-778" valLabely="0" circRot="0" labelrot="0" id="Connector-554" labelx="-16" boardRot="-1000000" objectName="Connector-554" rotation="0" y="-120" boardPos="-1e+06,-1e+06" endpinid="Push-66-switch0pinN" labely="-24" itemtype="Connector" pointList="-500,-120,-500,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-555:
Circuit Id: Connector-555
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-448" startpinid="Diode-117-lPin" enodeid="Circ_eNode-779" valLabely="0" circRot="0" labelrot="0" id="Connector-555" labelx="-16" boardRot="-1000000" objectName="Connector-555" rotation="0" y="-120" boardPos="-1e+06,-1e+06" endpinid="Push-67-switch0pinN" labely="-24" itemtype="Connector" pointList="-448,-120,-448,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-556:
Circuit Id: Connector-556
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-388" startpinid="Diode-116-lPin" enodeid="Circ_eNode-780" valLabely="0" circRot="0" labelrot="0" id="Connector-556" labelx="-16" boardRot="-1000000" objectName="Connector-556" rotation="0" y="-120" boardPos="-1e+06,-1e+06" endpinid="Push-68-switch0pinN" labely="-24" itemtype="Connector" pointList="-388,-120,-388,-140,-392,-140" vflip="1" mainComp="false"/>
Unique Id: Connector-557:
Circuit Id: Connector-557
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-388" startpinid="Diode-121-lPin" enodeid="Circ_eNode-781" valLabely="0" circRot="0" labelrot="0" id="Connector-557" labelx="-16" boardRot="-1000000" objectName="Connector-557" rotation="0" y="-228" boardPos="-1e+06,-1e+06" endpinid="Push-65-switch0pinN" labely="-24" itemtype="Connector" pointList="-388,-228,-388,-240,-392,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-558:
Circuit Id: Connector-558
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-444" startpinid="Diode-124-lPin" enodeid="Circ_eNode-782" valLabely="0" circRot="0" labelrot="0" id="Connector-558" labelx="-16" boardRot="-1000000" objectName="Connector-558" rotation="0" y="-228" boardPos="-1e+06,-1e+06" endpinid="Push-64-switch0pinN" labely="-24" itemtype="Connector" pointList="-444,-228,-444,-240,-448,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-559:
Circuit Id: Connector-559
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-500" startpinid="Diode-108-lPin" enodeid="Circ_eNode-783" valLabely="0" circRot="0" labelrot="0" id="Connector-559" labelx="-16" boardRot="-1000000" objectName="Connector-559" rotation="0" y="-224" boardPos="-1e+06,-1e+06" endpinid="Push-63-switch0pinN" labely="-24" itemtype="Connector" pointList="-500,-224,-500,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-563:
Circuit Id: Connector-563
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-500" startpinid="Diode-120-rPin" enodeid="Circ_eNode-784" valLabely="0" circRot="-1.1951277993834117e-310" labelrot="0" id="Connector-563" labelx="-16" boardRot="-1000000" objectName="Connector-563" rotation="0" y="-88" boardPos="-1e+06,-1e+06" endpinid="Node-564-1" labely="-24" itemtype="Connector" pointList="-500,-88,-488,-88,-488,-84" vflip="1" mainComp="false"/>
Unique Id: Connector-565:
Circuit Id: Connector-565
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-488" startpinid="Node-564-2" enodeid="Circ_eNode-784" valLabely="0" circRot="0" labelrot="0" id="Connector-565" labelx="-16" boardRot="-1000000" objectName="Connector-565" rotation="0" y="-84" boardPos="-1e+06,-1e+06" endpinid="Diode-108-rPin" labely="-24" itemtype="Connector" pointList="-488,-84,-488,-192,-500,-192" vflip="1" mainComp="false"/>
Unique Id: Connector-569:
Circuit Id: Connector-569
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-448" startpinid="Diode-117-rPin" enodeid="Circ_eNode-785" valLabely="0" circRot="0" labelrot="0" id="Connector-569" labelx="-16" boardRot="-1000000" objectName="Connector-569" rotation="0" y="-88" boardPos="-1e+06,-1e+06" endpinid="Node-570-1" labely="-24" itemtype="Connector" pointList="-448,-88,-432,-88" vflip="1" mainComp="false"/>
Unique Id: Connector-571:
Circuit Id: Connector-571
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-432" startpinid="Node-570-2" enodeid="Circ_eNode-785" valLabely="0" circRot="0" labelrot="0" id="Connector-571" labelx="-16" boardRot="-1000000" objectName="Connector-571" rotation="0" y="-88" boardPos="-1e+06,-1e+06" endpinid="Diode-124-rPin" labely="-24" itemtype="Connector" pointList="-432,-88,-432,-196,-444,-196" vflip="1" mainComp="false"/>
Unique Id: Connector-575:
Circuit Id: Connector-575
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-388" startpinid="Diode-116-rPin" enodeid="enode-807" valLabely="0" circRot="0" labelrot="0" id="Connector-575" labelx="-16" boardRot="-1000000" objectName="Connector-575" rotation="0" y="-88" boardPos="-1e+06,-1e+06" endpinid="Node-576-1" labely="-24" itemtype="Connector" pointList="-388,-88,-380,-88" vflip="1" mainComp="false"/>
Unique Id: Connector-577:
Circuit Id: Connector-577
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-380" startpinid="Node-576-2" enodeid="enode-807" valLabely="0" circRot="0" labelrot="0" id="Connector-577" labelx="-16" boardRot="-1000000" objectName="Connector-577" rotation="0" y="-88" boardPos="-1e+06,-1e+06" endpinid="Diode-121-rPin" labely="-24" itemtype="Connector" pointList="-380,-88,-380,-196,-388,-196" vflip="1" mainComp="false"/>
Unique Id: Connector-97:
Circuit Id: Connector-97
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB1" enodeid="Circ_eNode-771" valLabely="0" circRot="0" labelrot="0" id="Connector-97" labelx="-16" boardRot="-1000000" objectName="Connector-97" rotation="0" y="-204" boardPos="-1e+06,-1e+06" endpinid="Node-168-0" labely="-24" itemtype="Connector" pointList="-296,-204,-360,-204,-360,-164,-424,-164" vflip="1" mainComp="false"/>
Unique Id: Connector-98:
Circuit Id: Connector-98
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB2" enodeid="Circ_eNode-770" valLabely="0" circRot="0" labelrot="0" id="Connector-98" labelx="-16" boardRot="-1000000" objectName="Connector-98" rotation="0" y="-196" boardPos="-1e+06,-1e+06" endpinid="Node-105-0" labely="-24" itemtype="Connector" pointList="-296,-196,-352,-196,-352,-60,-424,-60" vflip="1" mainComp="false"/>
Unique Id: Connector-551:
Circuit Id: Connector-551
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB4" enodeid="Circ_eNode-785" valLabely="0" circRot="0" labelrot="0" id="Connector-551" labelx="-16" boardRot="-1000000" objectName="Connector-551" rotation="0" y="-180" boardPos="-1e+06,-1e+06" endpinid="Node-593-0" labely="-24" itemtype="Connector" pointList="-296,-180,-340,-180,-340,48,-432,48,-432,16" vflip="1" mainComp="false"/>
Unique Id: Connector-550:
Circuit Id: Connector-550
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB3" enodeid="Circ_eNode-784" valLabely="0" circRot="0" labelrot="0" id="Connector-550" labelx="-16" boardRot="-1000000" objectName="Connector-550" rotation="0" y="-188" boardPos="-1e+06,-1e+06" endpinid="Node-590-0" labely="-24" itemtype="Connector" pointList="-296,-188,-344,-188,-344,36,-488,36,-488,16" vflip="1" mainComp="false"/>
Unique Id: Connector-589:
Circuit Id: Connector-589
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-500" startpinid="Diode-113-rPin" enodeid="Circ_eNode-784" valLabely="0" circRot="0" labelrot="0" id="Connector-589" labelx="-16" boardRot="-1000000" objectName="Connector-589" rotation="0" y="4" boardPos="-1e+06,-1e+06" endpinid="Node-590-1" labely="-24" itemtype="Connector" pointList="-500,4,-500,16,-488,16" vflip="1" mainComp="false"/>
Unique Id: Connector-591:
Circuit Id: Connector-591
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-488" startpinid="Node-590-2" enodeid="Circ_eNode-784" valLabely="0" circRot="0" labelrot="0" id="Connector-591" labelx="-16" boardRot="-1000000" objectName="Connector-591" rotation="0" y="16" boardPos="-1e+06,-1e+06" endpinid="Node-564-0" labely="-24" itemtype="Connector" pointList="-488,16,-488,-84" vflip="1" mainComp="false"/>
Unique Id: Connector-592:
Circuit Id: Connector-592
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-448" startpinid="Diode-112-rPin" enodeid="Circ_eNode-785" valLabely="0" circRot="0" labelrot="0" id="Connector-592" labelx="-16" boardRot="-1000000" objectName="Connector-592" rotation="0" y="8" boardPos="-1e+06,-1e+06" endpinid="Node-593-1" labely="-24" itemtype="Connector" pointList="-448,8,-448,16,-432,16" vflip="1" mainComp="false"/>
Unique Id: Connector-594:
Circuit Id: Connector-594
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-432" startpinid="Node-593-2" enodeid="Circ_eNode-785" valLabely="0" circRot="0" labelrot="0" id="Connector-594" labelx="-16" boardRot="-1000000" objectName="Connector-594" rotation="0" y="16" boardPos="-1e+06,-1e+06" endpinid="Node-570-0" labely="-24" itemtype="Connector" pointList="-432,16,-432,-88" vflip="1" mainComp="false"/>
Unique Id: Connector-87:
Circuit Id: Connector-87
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB0" enodeid="Circ_eNode-769" valLabely="0" circRot="0" labelrot="0" id="Connector-87" labelx="-16" boardRot="-1000000" objectName="Connector-87" rotation="0" y="-212" boardPos="-1e+06,-1e+06" endpinid="Node-94-0" labely="-24" itemtype="Connector" pointList="-296,-212,-348,-212,-348,-268,-424,-268" vflip="1" mainComp="false"/>
Unique Id: Connector-682:
Circuit Id: Connector-682
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC1" enodeid="Circ_eNode-787" valLabely="0" circRot="0" labelrot="0" id="Connector-682" labelx="-16" boardRot="-1000000" objectName="Connector-682" rotation="0" y="-252" boardPos="-1e+06,-1e+06" endpinid="74HC4067-612-Z" labely="-24" itemtype="Connector" pointList="-152,-252,-140,-252,-140,-280,-80,-280" vflip="1" mainComp="false"/>
Unique Id: Connector-683:
Circuit Id: Connector-683
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC2" enodeid="Circ_eNode-788" valLabely="0" circRot="0" labelrot="0" id="Connector-683" labelx="-16" boardRot="-1000000" objectName="Connector-683" rotation="0" y="-260" boardPos="-1e+06,-1e+06" endpinid="74HC4067-612-S0" labely="-24" itemtype="Connector" pointList="-152,-260,-100,-260,-100,-264,-80,-264" vflip="1" mainComp="false"/>
Unique Id: Connector-684:
Circuit Id: Connector-684
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC3" enodeid="Circ_eNode-789" valLabely="0" circRot="0" labelrot="0" id="Connector-684" labelx="-16" boardRot="-1000000" objectName="Connector-684" rotation="0" y="-268" boardPos="-1e+06,-1e+06" endpinid="74HC4067-612-S1" labely="-24" itemtype="Connector" pointList="-152,-268,-104,-268,-104,-256,-80,-256" vflip="1" mainComp="false"/>
Unique Id: Connector-685:
Circuit Id: Connector-685
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC4" enodeid="Circ_eNode-790" valLabely="0" circRot="0" labelrot="0" id="Connector-685" labelx="-16" boardRot="-1000000" objectName="Connector-685" rotation="0" y="-276" boardPos="-1e+06,-1e+06" endpinid="74HC4067-612-S2" labely="-24" itemtype="Connector" pointList="-152,-276,-108,-276,-108,-248,-80,-248" vflip="1" mainComp="false"/>
Unique Id: Connector-686:
Circuit Id: Connector-686
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC5" enodeid="Circ_eNode-791" valLabely="0" circRot="0" labelrot="0" id="Connector-686" labelx="-16" boardRot="-1000000" objectName="Connector-686" rotation="0" y="-284" boardPos="-1e+06,-1e+06" endpinid="74HC4067-612-S3" labely="-24" itemtype="Connector" pointList="-152,-284,-112,-284,-112,-240,-80,-240" vflip="1" mainComp="false"/>
Unique Id: Connector-691:
Circuit Id: Connector-691
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-32" startpinid="74HC4067-612-Y0" enodeid="Circ_eNode-792" valLabely="0" circRot="0" labelrot="0" id="Connector-691" labelx="-16" boardRot="-1000000" objectName="Connector-691" rotation="0" y="-280" boardPos="-1e+06,-1e+06" endpinid="Push-687-pinP0" labely="-24" itemtype="Connector" pointList="-32,-280,20,-280" vflip="1" mainComp="false"/>
Unique Id: Connector-692:
Circuit Id: Connector-692
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-32" startpinid="74HC4067-612-Y1" enodeid="Circ_eNode-793" valLabely="0" circRot="0" labelrot="0" id="Connector-692" labelx="-16" boardRot="-1000000" objectName="Connector-692" rotation="0" y="-272" boardPos="-1e+06,-1e+06" endpinid="Push-688-pinP0" labely="-24" itemtype="Connector" pointList="-32,-272,12,-272,12,-232,20,-232" vflip="1" mainComp="false"/>
Unique Id: Connector-693:
Circuit Id: Connector-693
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-32" startpinid="74HC4067-612-Y2" enodeid="Circ_eNode-794" valLabely="0" circRot="0" labelrot="0" id="Connector-693" labelx="-16" boardRot="-1000000" objectName="Connector-693" rotation="0" y="-264" boardPos="-1e+06,-1e+06" endpinid="Push-689-pinP0" labely="-24" itemtype="Connector" pointList="-32,-264,4,-264,4,-184,20,-184" vflip="1" mainComp="false"/>
Unique Id: Connector-694:
Circuit Id: Connector-694
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="52" startpinid="Push-687-switch0pinN" enodeid="Circ_eNode-795" valLabely="0" circRot="0" labelrot="0" id="Connector-694" labelx="-16" boardRot="-1000000" objectName="Connector-694" rotation="0" y="-280" boardPos="-1e+06,-1e+06" endpinid="Node-696-0" labely="-24" itemtype="Connector" pointList="52,-280,92,-280,92,-232" vflip="1" mainComp="false"/>
Unique Id: Connector-695:
Circuit Id: Connector-695
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="52" startpinid="Push-688-switch0pinN" enodeid="Circ_eNode-795" valLabely="0" circRot="0" labelrot="0" id="Connector-695" labelx="-16" boardRot="-1000000" objectName="Connector-695" rotation="0" y="-232" boardPos="-1e+06,-1e+06" endpinid="Node-696-1" labely="-24" itemtype="Connector" pointList="52,-232,92,-232" vflip="1" mainComp="false"/>
Unique Id: Connector-697:
Circuit Id: Connector-697
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="92" startpinid="Node-696-2" enodeid="Circ_eNode-795" valLabely="0" circRot="0" labelrot="0" id="Connector-697" labelx="-16" boardRot="-1000000" objectName="Connector-697" rotation="0" y="-232" boardPos="-1e+06,-1e+06" endpinid="Node-699-0" labely="-24" itemtype="Connector" pointList="92,-232,92,-184" vflip="1" mainComp="false"/>
Unique Id: Connector-698:
Circuit Id: Connector-698
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="52" startpinid="Push-689-switch0pinN" enodeid="Circ_eNode-795" valLabely="0" circRot="0" labelrot="0" id="Connector-698" labelx="-16" boardRot="-1000000" objectName="Connector-698" rotation="0" y="-184" boardPos="-1e+06,-1e+06" endpinid="Node-699-1" labely="-24" itemtype="Connector" pointList="52,-184,92,-184" vflip="1" mainComp="false"/>
Unique Id: Connector-700:
Circuit Id: Connector-700
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="92" startpinid="Node-699-2" enodeid="Circ_eNode-795" valLabely="0" circRot="0" labelrot="0" id="Connector-700" labelx="-16" boardRot="-1000000" objectName="Connector-700" rotation="0" y="-184" boardPos="-1e+06,-1e+06" endpinid="Ground-690-Gnd" labely="-24" itemtype="Connector" pointList="92,-184,92,-156" vflip="1" mainComp="false"/>
Unique Id: Connector-701:
Circuit Id: Connector-701
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-448" startpinid="Push-78-switch0pinN" enodeid="Circ_eNode-796" valLabely="0" circRot="0" labelrot="0" id="Connector-701" labelx="-16" boardRot="-1000000" objectName="Connector-701" rotation="0" y="-44" boardPos="-1e+06,-1e+06" endpinid="Diode-112-lPin" labely="-24" itemtype="Connector" pointList="-448,-44,-448,-24" vflip="1" mainComp="false"/>
Unique Id: Connector-702:
Circuit Id: Connector-702
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-392" startpinid="Push-79-switch0pinN" enodeid="Circ_eNode-797" valLabely="0" circRot="0" labelrot="0" id="Connector-702" labelx="-16" boardRot="-1000000" objectName="Connector-702" rotation="0" y="-44" boardPos="-1e+06,-1e+06" endpinid="Diode-109-lPin" labely="-24" itemtype="Connector" pointList="-392,-44,-392,-24" vflip="1" mainComp="false"/>
Unique Id: Connector-586:
Circuit Id: Connector-586
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-392" startpinid="Diode-109-rPin" enodeid="enode-807" valLabely="0" circRot="0" labelrot="0" id="Connector-586" labelx="-16" boardRot="-1000000" objectName="Connector-586" rotation="0" y="8" boardPos="-1e+06,-1e+06" endpinid="Node-803-0" labely="-24" itemtype="Connector" pointList="-392,8,-392,24,-380,24" vflip="1" mainComp="false"/>
Unique Id: Connector-804:
Circuit Id: Connector-804
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-380" startpinid="Node-803-2" enodeid="enode-807" valLabely="0" circRot="0" labelrot="0" id="Connector-804" labelx="-16" boardRot="-1000000" objectName="Connector-804" rotation="0" y="24" boardPos="-1e+06,-1e+06" endpinid="Node-576-0" labely="-24" itemtype="Connector" pointList="-380,24,-380,-88" vflip="1" mainComp="false"/>
Unique Id: Connector-807:
Circuit Id: Connector-807
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PB5" enodeid="enode-807" valLabely="0" circRot="0" labelrot="0" id="Connector-807" labelx="-16" boardRot="-1000000" objectName="Connector-807" rotation="0" y="-172" boardPos="-1e+06,-1e+06" endpinid="Node-803-1" labely="-24" itemtype="Connector" pointList="-296,-172,-332,-172,-332,80,-380,80,-380,24" vflip="1" mainComp="false"/>
Unique Id: Connector-808:
Circuit Id: Connector-808
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-296" startpinid="Arduino Uno-1-PD7" enodeid="enode-808" valLabely="0" circRot="0" labelrot="0" id="Connector-808" labelx="-16" boardRot="-1000000" objectName="Connector-808" rotation="0" y="-228" boardPos="-1e+06,-1e+06" endpinid="Push-174-switch0pinN" labely="-24" itemtype="Connector" pointList="-296,-228,-340,-228,-340,-292,-404,-292" vflip="1" mainComp="false"/>
Unique Id: Connector-811:
Circuit Id: Connector-811
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-152" startpinid="Arduino Uno-1-PC0" enodeid="enode-811" valLabely="0" circRot="0" labelrot="0" id="Connector-811" labelx="-16" boardRot="-1000000" objectName="Connector-811" rotation="0" y="-244" boardPos="-1e+06,-1e+06" endpinid="Push-809-pinP0" labely="-24" itemtype="Connector" pointList="-152,-244,-128,-244,-128,-116,-72,-116" vflip="1" mainComp="false"/>
Unique Id: Connector-813:
Circuit Id: Connector-813
<item valLabRot="0" hflip="1" circPos="0,0" Show_id="false" valLabelx="0" x="-40" startpinid="Push-809-switch0pinN" enodeid="enode-813" valLabely="0" circRot="0" labelrot="0" id="Connector-813" labelx="-16" boardRot="-1000000" objectName="Connector-813" rotation="0" y="-116" boardPos="-1e+06,-1e+06" endpinid="Ground-812-Gnd" labely="-24" itemtype="Connector" pointList="-40,-116,-16,-116,-16,-92" vflip="1" mainComp="false"/>
</circuit>

View File

@ -0,0 +1,8 @@
TARGET_BOARD=arduino:avr:uno
COM_PORT=/dev/ttyACM0
build:
arduino-cli compile -b ${TARGET_BOARD}
upload:
arduino-cli upload -b ${TARGET_BOARD} -p ${COM_PORT}

View File

@ -2,21 +2,33 @@
// In this example, we have 3 toggle switches and 2 momentary pushbuttons.
// Each button is configured in a different one of the available behaviors.
#include <Bounce2.h>
#include <Joystick.h>
bool debug = false;
Joystick joystick(debug);
void setup() {
// momentary pushbutton #1
joystick.AddButton(9, BUTTON_PASSTHRU);
// momentary pushbutton #2 - this one will toggle on or off each time it is pushed
joystick.AddButton(10, BUTTON_LATCHED_MOMENTARY);
// a toggle switch that acts like a momentary button - every time it's toggled 'on' it briefly sends
// a keypresss
joystick.AddButton(11, BUTTON_PULSED);
// like the above, but it sends its button press when toggled on *and* when toggled off
joystick.AddButton(12, BUTTON_PULSED_DOUBLE_ACTION);
// again, similar to the above, but it sends two *different* button presses - 'on' will be one button, 'off' another.
joystick.AddButton(13, BUTTON_PULSED_DOUBLE_ACTION_SPLIT);
// start up serial communication
joystick.Init();
}
void loop() {
// check all the button states and send any changes
joystick.Update();
}

View File

@ -0,0 +1,8 @@
TARGET_BOARD=arduino:avr:uno
COM_PORT=/dev/ttyACM0
build:
arduino-cli compile -b ${TARGET_BOARD}
upload:
arduino-cli upload -b ${TARGET_BOARD} -p ${COM_PORT}

View File

@ -0,0 +1,40 @@
// An example sketch using the joystick library.
// This example includes every possible feature of the library.
// It assumes an Arduino Nano and a 16-channel multiplexer.
#include <Joystick.h>
#include <Mux.h>
using namespace admux;
bool debug = false;
Joystick joystick(debug);
void setup() {
joystick.AddButton(2, BUTTON_PASSTHRU); // this button will always transfer its current literal state to the computer
joystick.AddButton(3, BUTTON_LATCHED_MOMENTARY); // this button will start sending a buttonpress on one push, and keep it "held down" until it is pushed again.
joystick.AddButton(4, BUTTON_PULSED); // this button will send a buttonpress very briefly every time it is activated. Good for a toggle switch that shouldn't be "latched" in practice.
joystick.AddButton(5, BUTTON_PULSED_DOUBLE_ACTION); // like the above, but it sends its button press when toggled on *and* when toggled off
joystick.AddButton(6, BUTTON_PULSED_DOUBLE_ACTION_SPLIT); // again, similar to the above, but it sends two *different* button presses - 'on' will be one button, 'off' another.
joystick.AddEncoder(7, 8, ENCODER_PULSED_SPLIT); // a rotary encoder that will send 2 different buttonpresses - one when the encoder is turned clockwise, another when it is turned counterclockwise.
Pinset addr_pins = Pinset(10, 11, 12, 13);
uint8_t mux_id = joystick.AddMux(9, addr_pins);
Mux* mux = new Mux(Pin(9, INPUT_PULLUP, PinType::Digital), Pinset(10, 11, 12, 13));
joystick.AddButton(0, BUTTON_PASSTHRU, true, mux);
// start up serial communication
joystick.Init();
}
void loop() {
// check all the button states and send any changes
joystick.Update();
}

View File

@ -0,0 +1,8 @@
TARGET_BOARD=arduino:avr:uno
COM_PORT=/dev/ttyACM0
build:
arduino-cli compile -b ${TARGET_BOARD}
upload:
arduino-cli upload -b ${TARGET_BOARD} -p ${COM_PORT}

View File

@ -0,0 +1,52 @@
// An example sketch using the joystick library, demonstrating multiplexer support
// In this example, we have 21 buttons we want to attach.
// Unfortunately, the Arduino Uno only has 17 pins we can use!
// So we've added an 8-channel multiplexer, connected to pins A1-A5.
//
// Note: this may not be the best approach for this many simple buttons. Using an input matrix
// would require as few as 10 inputs in this scenario, for example. This is just a demo :)
#include <Joystick.h>
#include <Mux.h>
using namespace admux;
bool debug = false;
Joystick joystick(debug);
void setup() {
// All of our digital pins and A0 are taken up with pushbuttons
joystick.AddButton(2, BUTTON_PASSTHRU);
joystick.AddButton(3, BUTTON_PASSTHRU);
joystick.AddButton(4, BUTTON_PASSTHRU);
joystick.AddButton(5, BUTTON_PASSTHRU);
joystick.AddButton(6, BUTTON_PASSTHRU);
joystick.AddButton(7, BUTTON_PASSTHRU);
joystick.AddButton(8, BUTTON_PASSTHRU);
joystick.AddButton(9, BUTTON_PASSTHRU);
joystick.AddButton(10, BUTTON_PASSTHRU);
joystick.AddButton(11, BUTTON_PASSTHRU);
joystick.AddButton(12, BUTTON_PASSTHRU);
joystick.AddButton(13, BUTTON_PASSTHRU);
joystick.AddButton(A0, BUTTON_PASSTHRU);
// to get more room for our inputs, we add an 8-bit multiplexer
Mux* mux = new Mux(Pin(A1, INPUT_PULLUP, PinType::Digital), Pinset(A2, A3, A4, A5));
// now we can add the rest of the buttons
joystick.AddButton(0, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(1, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(2, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(3, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(4, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(5, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(6, BUTTON_PASSTHRU, true, mux);
joystick.AddButton(7, BUTTON_PASSTHRU, true, mux);
joystick.Init();
}
void loop() {
// check all the button states and send any changes
joystick.Update();
}