Skip to content

Instantly share code, notes, and snippets.

@panchiga
Created December 8, 2014 22:03
Show Gist options
  • Save panchiga/f19a396b0924a1ba547d to your computer and use it in GitHub Desktop.
Save panchiga/f19a396b0924a1ba547d to your computer and use it in GitHub Desktop.
// Arduino用プログラム
const int PUSH = 13;
void setup()
{
Serial.begin(9600);
pinMode(PUSH, OUTPUT);
digitalWrite(PUSH, LOW);
}
void loop()
{
if(Serial.available() > 0) {
// シリアル通信で何か受信したら◯ボタン
digitalWrite(PUSH, HIGH);
delay(200); // 200[ms]待つ
digitalWrite(PUSH,LOW);
//吐き出す
Serial.read();
}
}
@panchiga
Copy link
Author

panchiga commented Dec 8, 2014

avoid_thunder.pyと一緒に使うよ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment