add includes to USB examples

This commit is contained in:
Martino Facchin 2015-07-15 16:05:28 +02:00 committed by Cristian Maglie
parent 5cc7c1078f
commit 99814355ec
7 changed files with 22 additions and 0 deletions

View File

@ -29,6 +29,9 @@
#define WINDOWS 1 #define WINDOWS 1
#define UBUNTU 2 #define UBUNTU 2
#include "Keyboard.h"
#include "HID.h"
// change this to match your platform: // change this to match your platform:
int platform = OSX; int platform = OSX;

View File

@ -20,6 +20,9 @@
http://www.arduino.cc/en/Tutorial/KeyboardMessage http://www.arduino.cc/en/Tutorial/KeyboardMessage
*/ */
#include "Keyboard.h"
#include "HID.h"
const int buttonPin = 4; // input pin for pushbutton const int buttonPin = 4; // input pin for pushbutton
int previousButtonState = HIGH; // for checking the state of a pushButton int previousButtonState = HIGH; // for checking the state of a pushButton
int counter = 0; // button push counter int counter = 0; // button push counter

View File

@ -27,6 +27,9 @@
http://www.arduino.cc/en/Tutorial/KeyboardReprogram http://www.arduino.cc/en/Tutorial/KeyboardReprogram
*/ */
#include "Keyboard.h"
#include "HID.h"
// use this option for OSX. // use this option for OSX.
// Comment it out if using Windows or Linux: // Comment it out if using Windows or Linux:
char ctrlKey = KEY_LEFT_GUI; char ctrlKey = KEY_LEFT_GUI;

View File

@ -19,6 +19,9 @@
http://www.arduino.cc/en/Tutorial/KeyboardSerial http://www.arduino.cc/en/Tutorial/KeyboardSerial
*/ */
#include "Keyboard.h"
#include "HID.h"
void setup() { void setup() {
// open the serial port: // open the serial port:
Serial.begin(9600); Serial.begin(9600);

View File

@ -21,6 +21,10 @@
*/ */
#include "Keyboard.h"
#include "Mouse.h"
#include "HID.h"
// set pin numbers for the five buttons: // set pin numbers for the five buttons:
const int upButton = 2; const int upButton = 2;
const int downButton = 3; const int downButton = 3;

View File

@ -24,6 +24,9 @@
*/ */
#include "Mouse.h"
#include "HID.h"
// set pin numbers for the five buttons: // set pin numbers for the five buttons:
const int upButton = 2; const int upButton = 2;
const int downButton = 3; const int downButton = 3;

View File

@ -28,6 +28,9 @@
*/ */
#include "Mouse.h"
#include "HID.h"
// set pin numbers for switch, joystick axes, and LED: // set pin numbers for switch, joystick axes, and LED:
const int switchPin = 2; // switch to turn on and off mouse control const int switchPin = 2; // switch to turn on and off mouse control
const int mouseButton = 3; // input pin for the mouse pushButton const int mouseButton = 3; // input pin for the mouse pushButton