Surilli
Published © LGPL

Controlling LED using Surilli Basic M0 and Python

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

BeginnerFull instructions provided30 minutes466
Controlling LED using Surilli Basic M0 and Python

Things used in this project

Hardware components

Surilli Basic
Surilli Basic
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1
Resistor 100 ohm
Resistor 100 ohm
×1

Software apps and online services

Arduino IDE
Arduino IDE
Python

Story

Read more

Schematics

Controlling LED using Surilli Basic M0 and Python

File missing, please reupload.

Code

LED_Blink_with_Python

C/C++
void setup() { 
  SerialUSB.begin(9600);                               //initialize serial COM at 9600 baudrate
  pinMode(13, OUTPUT);                    //declare the LED pin (13) as output
 }
 
void loop() {
if (SerialUSB.available())    //whatever the data that is coming in serially and assigning the value to the variable data
{
switch(SerialUSB.read())
{
case '0': digitalWrite(13, LOW);
          break;
case '1': digitalWrite(13, 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