Cirineu - EngeBOT Technology - member
Published © LGPL

1- Blinking the LEDs sequentially with the Tatamaya BLACK

Blinking the LEDs sequentially with the Tatamaya BLACK, using the Arduino UNO.

BeginnerFull instructions provided997
1- Blinking the LEDs sequentially with the Tatamaya BLACK

Things used in this project

Hardware components

EngeBOT Technology Tatamaya BLACK
×1
Arduino UNO
Arduino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Blinking the LEDs sequentially with the Tatamaya BLACK, using the Arduino ONE.

C/C++
Neste exemplo, mostraremos como piscar os leds sequencialmente com a Tatamaya BLACK, utilizando o Arduino UNO.
/*
  Arrays
 
 Demonstrates the use of  an array to hold pin numbers
 in order to iterate over the pins in a sequence. 
 Lights multiple LEDs in sequence, then in reverse.
 
 Unlike the For Loop tutorial, where the pins have to be
 contiguous, here the pins can be in any random order.
 
 The circuit:
 * LEDs from pins 2 through 7 to ground
 
 created 2006
 by David A. Mellis
 modified 30 Aug 2011
 by Tom Igoe
 
 /*
  EngeBOT Technology - adapted By Cirineu
  www.engebot.com
  www.linkedin.com/in/cirineu-carvalho-fernandes-20490a37
  www.facebook.com/engebot.tecnologia
  www.instagram.com/engebot.technology
  br.pinterest.com/engebottechnology
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

This example code is in the public domain.
 
 http://www.arduino.cc/en/Tutorial/Array
 
 */
const int NbrLEDs = 9;
const int ledPins[] = {13, 11, 10, 12, 3, 2, 4, 5, 6 };
const int wait = 20;
void setup(){
  for (int led = 0; led < NbrLEDs; led++)
  {
    pinMode(ledPins[led], OUTPUT);
  }
}
void loop() {
  for (int led = 0; led < NbrLEDs-1; led++)
  {
   digitalWrite(ledPins[led], HIGH);
   delay(wait);
   digitalWrite(ledPins[led + 1], HIGH);
   delay(wait);
   digitalWrite(ledPins[led], LOW);
   delay(wait*2);
  }
  for (int led = NbrLEDs; led > 0; led--) {
   digitalWrite(ledPins[led], HIGH);
   delay(wait);
   digitalWrite(ledPins[led - 1], HIGH);
   delay(wait);
   digitalWrite(ledPins[led], LOW);
   delay(wait*2);
  }
}

Credits

Cirineu - EngeBOT Technology - member

Cirineu - EngeBOT Technology - member

2 projects • 0 followers
EngeBOT Technology - members team.

Comments