Arduino
Arduino copied to clipboard
KeyboardButton tutorial has incorrect documentation
There are some inconsistencies in the code comments and on the tutorial web page for the KeyboardButton USB Tutorial:
- the code comments suggest pin 2 is used; in fact pin 4 is used
/*
...
The circuit:
* pushbutton attached from pin 2 to +5V
* 10-kilohm resistor attached from pin 4 to ground
...
*/
const int buttonPin = 4; // input pin for pushbutton
it should read
/*
...
The circuit:
* pushbutton attached from pin 4 to +5V
* 220-kilohm resistor attached from pin 4 to ground
...
*/
- the web page and the code suggest a 10kOhm resistor is used; the circuit diagram on the web page uses 220kOhm as does the Fritzing image. (Just a pull-down resistor so I'm pretty sure the value is not so important - maybe USB powered considerations were reason for increasing it?)
Should have been a 10K resistor in the images, thanks.