Lana VulicLuigi Francesco Cerfeda
Published © GPL3+

Blinking an LED Using Python - Getting Started with Zerynth

Here's a detailed tutorial on how to do some LED blinking using Python, with Zerynth Studio and XinaBox.

BeginnerProtip1 hour1,254
Blinking an LED Using Python - Getting Started with Zerynth

Things used in this project

Hardware components

CW02
XinaBox CW02
×1
IP01
XinaBox IP01
×1

Software apps and online services

Zerynth Studio
Zerynth Studio

Story

Read more

Schematics

CW02 Pin Mapping

Code

LED blinking in Python with Zerynth Studio

Python
# D0 to D127 represent the names of digital pins
# On most Arduino-like boards Pin D13 has an on-board LED connected.
# However Zerynth abstracts the board layout allowing to use LED0, LED1, etc as led names.
# In this example LED0 is used.

pinMode(D26,OUTPUT) # green LED
# loop forever

while True:
        digitalWrite(D26, HIGH)  # turn the LED ON by setting the voltage HIGH        sleep(1000)               # wait for a second
        digitalWrite(D26, LOW)   # turn the LED OFF by setting the voltage LOW        sleep(1000)               # wait for a second

Credits

Lana Vulic
4 projects • 7 followers
Luigi Francesco Cerfeda
6 projects • 95 followers
Yet another Tony Stark wannabe

Comments