Surilli
Published © LGPL

Controlling LED Using Surilli WiFi and Python

Control the action of LED i.e. blinking ON and OFF.

BeginnerFull instructions provided30 minutes592
Controlling LED Using Surilli WiFi and Python

Things used in this project

Hardware components

Surilli WiFi
Surilli WiFi
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Python

Story

Read more

Schematics

Controlling LED Using Surilli WiFi and Python

Code

LED_Blink_with_Python

C/C++
void setup() { 
 Serial.begin(9600);                               //initialize serial COM at 9600 baudrate
 pinMode(2, OUTPUT);                    //declare the LED pin (2) as output
}
void loop() {
if (Serial.available())    //whatever the data that is coming in serially and assigning the value to the variable data
{
switch(Serial.read())
{
case '0': digitalWrite(2, LOW);
         break;
case '1': digitalWrite(2, HIGH);
         break;
default:  break;
}
}
}

Credits

Surilli
196 projects • 65 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments