🛠️ Dive into our collection of DIY Kits, 🔊 Audio Amplifiers, Digital Scoreboards, FM transmitters, and more!
🎶 Explore endless possibilities at our new store.


LED ON/OFF using Arduino and Android

void setup() {
// Open serial communications:
Serial.begin(9600);
pinMode(11, OUTPUT);
// send an intro:
Serial.println("Enter a value");
Serial.println();
}
void loop() {
// get any incoming bytes:
if (Serial.available() > 0) {
int thisChar = Serial.read();
// say what was sent:
Serial.print("You sent me: \'");
Serial.write(thisChar);
if (thisChar=='A')
{
digitalWrite(11, HIGH);
}
else {
digitalWrite(11, LOW);
}
Serial.print("\' ASCII Value: ");
Serial.println(thisChar);
Serial.println();
Serial.println("Give me another byte:");
Serial.println();
}
}


🛠️ Dive into our collection of DIY Kits, 🔊 Audio Amplifiers, Digital Scoreboards, FM transmitters, and more!
🎶 Explore endless possibilities at our new store.


Leave a Reply

Your email address will not be published. Required fields are marked *