Beginner: Try to use Sparkfun Pro Micro as a keyboard


hi guys,

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

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support