mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
add includes to USB examples
This commit is contained in:
parent
5cc7c1078f
commit
99814355ec
@ -29,6 +29,9 @@
|
||||
#define WINDOWS 1
|
||||
#define UBUNTU 2
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "HID.h"
|
||||
|
||||
// change this to match your platform:
|
||||
int platform = OSX;
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
http://www.arduino.cc/en/Tutorial/KeyboardMessage
|
||||
*/
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "HID.h"
|
||||
|
||||
const int buttonPin = 4; // input pin for pushbutton
|
||||
int previousButtonState = HIGH; // for checking the state of a pushButton
|
||||
int counter = 0; // button push counter
|
||||
|
@ -27,6 +27,9 @@
|
||||
http://www.arduino.cc/en/Tutorial/KeyboardReprogram
|
||||
*/
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "HID.h"
|
||||
|
||||
// use this option for OSX.
|
||||
// Comment it out if using Windows or Linux:
|
||||
char ctrlKey = KEY_LEFT_GUI;
|
||||
|
@ -19,6 +19,9 @@
|
||||
http://www.arduino.cc/en/Tutorial/KeyboardSerial
|
||||
*/
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "HID.h"
|
||||
|
||||
void setup() {
|
||||
// open the serial port:
|
||||
Serial.begin(9600);
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "Mouse.h"
|
||||
#include "HID.h"
|
||||
|
||||
// set pin numbers for the five buttons:
|
||||
const int upButton = 2;
|
||||
const int downButton = 3;
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "Mouse.h"
|
||||
#include "HID.h"
|
||||
|
||||
// set pin numbers for the five buttons:
|
||||
const int upButton = 2;
|
||||
const int downButton = 3;
|
||||
|
@ -28,6 +28,9 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "Mouse.h"
|
||||
#include "HID.h"
|
||||
|
||||
// set pin numbers for switch, joystick axes, and LED:
|
||||
const int switchPin = 2; // switch to turn on and off mouse control
|
||||
const int mouseButton = 3; // input pin for the mouse pushButton
|
||||
|
Loading…
x
Reference in New Issue
Block a user