Arduino Leonardoを購入して遊んでいます。 今回は、マウスとキーボードのエミュレーションなど。 Arduino Leonardoはマウス・キーボードライブラリが組み込まれていて、PCを操作することができます。 >Arduinoリファレンス-Leonardo特有(GarretLab) キーボード操作でtwitterログイン まずはキーボードから。 //キーボード操作でtwitterログイン(Windows Only) void setup(){ pinMode(12, INPUT_PULLUP); Keyboard.begin(); } void loop(){ while(digitalRead(12)) {delay(100);} Keyboard.press(KEY_LEFT_GUI); Keyboard.press('r'); delay(100); Keyboard.
![Arduino Leonardoを購入した(マウスとキーボードのエミュレーション)](https://cdn-ak-scissors.b.st-hatena.com/image/square/b88e5bf0986a628c02b32378325bdb480fe5d097/height=288;version=1;width=512/https%3A%2F%2Fblog-imgs-54.fc2.com%2Ff%2Fo%2Fc%2Ffocuslights%2Farduino21.jpg)