int data;
int led1=11;
int led2=12;
int led3=13;
void setup(){
Serial.begin(9600);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
}
void loop(){
if(Serial.available())
{
int data=Serial.read();
delay(100);
if(data=='1')
digitalWrite(led1,HIGH);
if(data=='2')
digitalWrite(led1,LOW);
if(data=='3')
digitalWrite(led2,HIGH);
if(data=='4')
digitalWrite(led2,LOW);
if(data=='5')
digitalWrite(led3,HIGH);
if(data=='6')
digitalWrite(led3,LOW);
delay(100);
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
License
muhammedalys/bluetoothileled
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published