2015-11-06 17:07:37 +00:00
|
|
|
// This is the same 5-toggle-switch example from switch_panel.ino, using the
|
|
|
|
// new API. So much easier!
|
|
|
|
|
2015-11-13 05:53:06 +00:00
|
|
|
#include <Bounce2.h>
|
2015-11-06 17:07:37 +00:00
|
|
|
#include <Joystick.h>
|
|
|
|
|
|
|
|
Joystick joystick;
|
|
|
|
|
|
|
|
void setup() {
|
|
|
|
pinMode(13, OUTPUT);
|
|
|
|
digitalWrite(13, LOW);
|
|
|
|
|
|
|
|
joystick.Init();
|
|
|
|
joystick.AddButton(2, BUTTON_PULSED_DOUBLE_ACTION, true);
|
|
|
|
joystick.AddButton(3, BUTTON_PULSED_DOUBLE_ACTION, true);
|
|
|
|
joystick.AddButton(4, BUTTON_PULSED_DOUBLE_ACTION, true);
|
|
|
|
joystick.AddButton(5, BUTTON_PULSED_DOUBLE_ACTION, true);
|
|
|
|
joystick.AddButton(6, BUTTON_PULSED_DOUBLE_ACTION, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop () {
|
|
|
|
joystick.Update();
|
|
|
|
}
|