First Omega2+ project ( Hello World -blinking LED )

Refer below link for the complete tutorial ,

http://www.cnx-software.com/2017/01/16/getting-started-with-onion-omega2-lede-wifi-iot-board-and-expansion-dock/

img_1119

Script File

==========

  1. Make sure Omega2+ firmware is updated.
  2. chmod +x  scriptfile.sh

#!/bin/ash

## Simple script to blink a LED on the Onion Omega using gpioctl

## the variable that will hold the pin number, where the LED lamp is connected

LED_PIN=1

## declare the LED_PIN as output

gpioctl dirout-low $LED_PIN

while true

do

## set LED_PIN to HIGH (turn LED on)

gpioctl dirout-high $LED_PIN

## sleep for 1 second (equivalent to Arduino’s delay(1000)

sleep 1

## set LED_PIN to LOW (turn LED off)

gpioctl dirout-low $LED_PIN

## sleep for 1 second (equivalent to Arduino’s delay(1000)

sleep 1

done

Advertisements

About buminda

buminda.com
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s