Things used in this project

Hardware components:
Udooneo trasparent
UDOO NEO
×1

Schematics

ULN2803
uln2803.fzz
connecting a few leds :)
Check the polarity of the components !!!!!
uln2803.fzz

Code

Arduino arrayArduino
This code declares a few leds, and puts them in an array. Afterwards it lights on and off the different leds.
int timer = 1000;        
int ledPins[] = { 
   5,6,7,8, 9, 10,11, 12 };       // an array of pin numbers to which LEDs are attached
int pinCount = 8;           // the number of pins (i.e. the length of the array)

void setup() {
  // the array elements are numbered from 0 to (pinCount - 1).
  // use a for loop to initialize each pin as an output:
  for (int thisPin = 0; thisPin < pinCount; thisPin++)  {
    pinMode(ledPins[thisPin], OUTPUT);      
  }
}

void loop() {
  // loop from the lowest pin to the highest:
  for (int thisPin = 0; thisPin < pinCount; thisPin++) { 
    digitalWrite(ledPins[thisPin], HIGH);   
    delay(timer);                  
    digitalWrite(ledPins[thisPin], LOW);    

  }

  // loop from the highest pin to the lowest:
  for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { 
    digitalWrite(ledPins[thisPin], HIGH);
    delay(timer);
    digitalWrite(ledPins[thisPin], LOW);
  }
}

Credits

Replications

Did you replicate this project? Share it!

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Netflix on Raspberry Pi
Easy
  • 643
  • 4

Protip

A step-by-step guide for running Netflix on Raspberry Pi.

Make your own remote temperature/humidity sensor
Easy
  • 1,869
  • 18

Full instructions

Let's make our own remote sensor sending the data by oregon v.2.1 protocol. The sensor can re read by Oregon weather station.

IoT Ambient Light: Zerynth Lamp
Easy
  • 4,959
  • 22

Full instructions

Smart lighting is a catalyst for the IoT. In this tutorial we'll see how to control NeoPixel LEDs via mobile using the Zerynth App.

Udoo Quad/Dual/Neo Library 2.0
Easy
  • 2,920
  • 21

Full instructions

A Library that makes the linux side act like a shield to the arduino side(TCP, UDP Server/Client and Storage, Usb and soon to come audio)

New Era of Gaming on Raspberry Pi
Easy
  • 3,673
  • 12

Protip

Learn how to play Counter Strike and Diablo II on Raspberry Pi with ExaGear Desktop 2.0 3D Acceleration Update

Gaming Beyond RetroPie
Easy
  • 1,807
  • 11

Protip

How to play Arcanum, Disciples II, Fallout and other Windows PC games on Raspberry Pi with the help of ExaGear Desktop.

Add projectSign up / Login