Skip to content

Instantly share code, notes, and snippets.

@houmei
Created December 10, 2012 12:19
Show Gist options
  • Save houmei/4250251 to your computer and use it in GitHub Desktop.
Save houmei/4250251 to your computer and use it in GitHub Desktop.
Androld Serial Monitor Lite -- UNO R3 OK、Leonardo/Micro NG
// Androld Serial Monitor Lite
// tested 2012.12.10
// MacOSX 10.7
// Arduino IDE 1.0.2
//
// Arduino UNO R3 -- OK
// Arduino Leonardo -- 問題が発生したため、Android USB Serial Monitorを終了しました
// →ConnectしてもAndroid→Arduino方向しかデータがいかない (RX点滅,TX消灯のまま)
// Arduino Micro -- Leonardoと同じ現象
//
void setup(){
pinMode(7,INPUT_PULLUP);
Serial.begin(9600);
delay(5000);
}
void loop(){
if(Serial.available()) {
int a=Serial.read();
Serial.println(a,HEX);
}
if(digitalRead(7)==LOW) {
Serial.println("32U4");
}
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment