Move examples into subdirectories so they can be compiled and uploaded by Arduino as-is.

This commit is contained in:
2015-11-13 00:51:55 -05:00
parent 40f6c99922
commit d0038eba44
3 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// A button box example using all of the button types.
// This is the code used in the Black Box project.
// TODO: add link to blog post, once it exists.
#include <Joystick.h>
Joystick joystick;
void setup() {
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
joystick.Init();
joystick.AddButton(2, BUTTON_PULSED_DOUBLE_ACTION);
joystick.AddButton(3, BUTTON_PULSED_DOUBLE_ACTION);
joystick.AddButton(4, BUTTON_PULSED_DOUBLE_ACTION);
joystick.AddButton(5, BUTTON_LATCHED);
joystick.AddButton(6, BUTTON_PULSED);
}
void loop () {
joystick.Update();
}