Skip to content

Instantly share code, notes, and snippets.

@raphaeldealmeida
Created October 8, 2011 16:51
Show Gist options
  • Save raphaeldealmeida/1272537 to your computer and use it in GitHub Desktop.
Save raphaeldealmeida/1272537 to your computer and use it in GitHub Desktop.
Arduino PHP
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
if (Serial.available() > 0) {
if(Serial.read() == 'A'){
digitalWrite(13, HIGH);
}else{
digitalWrite(13, LOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment