mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
add includes to USB examples
This commit is contained in:
parent
5cc7c1078f
commit
99814355ec
@ -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;
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user