Beginner: Try to use Sparkfun Pro Micro as a keyboard
hi guys,
today first sparkfun pro micro , i' starting use keyboard. first uploaded sketch:
the upload works fine, , opened text editor. if close pin 9 , ground nothing happens. have no idea, fault.
today first sparkfun pro micro , i' starting use keyboard. first uploaded sketch:
code: [select]
int buttonpin = 9; // set button pin
void setup()
{
pinmode(buttonpin, input); // set button input
digitalwrite(buttonpin, high); // pull button high
}
void loop()
{
if (digitalread(buttonpin) == 0) // if button goes low
{
keyboard.write('z'); // send 'z' computer via keyboard hid
delay(1000); // delay there aren't kajillion z's
}
}
the upload works fine, , opened text editor. if close pin 9 , ground nothing happens. have no idea, fault.
now works. programmed board pro micro protokoll 3,3v version. have 5v version
Arduino Forum > Using Arduino > Installation & Troubleshooting > Beginner: Try to use Sparkfun Pro Micro as a keyboard
arduino
Comments
Post a Comment