Hi guys,
today I get my first Sparkfun Pro Micro and I' starting to use it as a keyboard. First I uploaded the sketch:
int buttonPin = 9; // Set a button to any pin
void setup()
{
pinMode(buttonPin, INPUT); // Set the button as an input
digitalWrite(buttonPin, HIGH); // Pull the button high
}
void loop()
{
if (digitalRead(buttonPin) == 0) // if the button goes low
{
Keyboard.write('z'); // send a 'z' to the computer via Keyboard HID
delay(1000); // delay so there aren't a kajillion z's
}
}
The upload works fine, and I opened a text editor. If I close Pin 9 and ground nothing happens. I have no idea, about my fault.