Raspberry Pi LED Blink - 10 minutes beginners

Last modified: October 5, 2019

Introduction

Starting with the Raspberry Pi ? blinking leds is the ideal project for you. The tutorial can be achieved in just 10mins. So Have fun!

Hardware requirement

What we need for the project:

Components Where to buy
BreadBoard https://octopart.com/bb-32621-bud+industries-29442527
Raspberry PI Zero W OR Raspberry PI 3 Model B https://www.sparkfun.com/products/13825
Micro SDCard - 8GB is plenty https://www.amazon.com/SanDisk-Class-SDHC-Flash-Memory/dp/B00FM5E1EY
USB micro-B Cable - 6 Foot (for power) https://octopart.com/3025013-06-qualtek-30541311
47 Ohm Resistor https://octopart.com/fmp200jr-52-47r-yageo-19037918
Jumper Wires Pack - M/F https://octopart.com/prt-12794-sparkfun-71808628
LED - Basic Blue 5mm https://octopart.com/c503b-bcs-cv0z0461-cree-10438824

Software requirement

  • A free ionoid account to easily manage Raspberry PI and deploy code
  • A tool to flash a Micro SDCard (Etcher)

Raspberry PI setup

Step 0: Register Or connect to ionoid.io

Before starting your Raspberry you need an ionoid account, if you dont have one please create one By following the guide from official ionoid documentation

login

Step 1: Create the "LED Blink" Project

Create your "LED Blink" Project in Ionoid Platform To make our life easier and to keep thing organized in ionoid.io, for every device we add to the platform, it needs to belong to a project, if you did not already create one please do by following the instructions in the official documentation

Use "Led Blink" as a name for the project or any other name. Just make sure you select the right hardware architecture for your device.

CreateNewProject

Step 2: Add your Raspberry PI to "LED Blink" Project

Click on "Add device" button. A modal box will appear. Fill up the optional form with your configuration.

a) You can select which Raspbian Operating System version you want to install on your Raspberry Pi. There are three versions where the "lite" option comes without desktop, chose other desktop versions if you are planning to connect your Raspberry Pi to a display.

b) If you are planning to connect your Raspberry Pi using WiFi, then add your WiFi configuration, and maybe add your phone hotspot WiFI as fallback WiFi, just in case.

Step 3: Download Operating system image

After system configuration, click on "DOWNLOAD OS" to lunch the build os service, It will build a private Raspbian image for you. A link will be provided to you so you can download your OS image.

The generated image will be used to flash your Micro SDCard, so please download it to your local machine.

Step 4: Flash your Micro SDCard and power on Raspberry PI

Flash the Micro SDCard (installing Raspbian inside our Micro SDCard): Now it's time to use Etcher

etcher 1 4 9

Choose as image parameter your downloaded image and as drive parameter your connected Micro SDCard and finally click on flash.

After finishing flashing your Micro SDCard connect your Micro SDCard to your Raspberry PI and power it on, if your Raspberry PI is up and running we can go to the next step.

Wiring

To see the wiring in more detail click in THIS LINK Follow the instructions from the link (circuit.io) to wire correctly every element

LED Raspberry PI
LED + resistor GND pin
Vin GPIO 18

led 3v3

Deploy the App

Most of the app used in ionoid are binary compiled from Golang source code, You'll need a different app version depending on what Raspberry PI you use, taking in account our case with LED project, if you used Raspberry PI 0 you'll need the ARM6 version which is a Golang source code that controls the LED compiled to ARMv6, if you used a Raspberry PI 3 B/B+ it will be the ARMv7 version of the same source code.

Time to get our hand at work, first we need App link, as explained above, we have two links:

ARMv6 (Raspberry PI 0)

https://github.apps.ionoid.net/traffic-lights/arm6/app.tar

ARMv7 (Raspberry PI 3 and upper)

https://github.apps.ionoid.net/traffic-lights/arm7/app.tar

After selecting the one corresponding to your Raspberry PI and copying it inside our app configuration like the following:

Connect to Ionoit and go inside your device page, click "DEPLOY APP" button like the following image

dashboard

Copy the link you copied precedently in the corresponding field as it's presented in the following image

dashboard app

Click "DEPLOY" and wait for the operation to finish. Congratulation, you just deployed your app.

Conclusion

From now on you'll be able to manage your device and the code that it runs, to see what the app is displaying you can activate device log display log

If you want to learn more feel free to explore docs.ionoid.io or the project repository

Subscribe to our newsletter