# data[].attributes.body
const int buttonPin1 = 1;
const int buttonPin2 = 2;
const int ledPin =  18;
const int ledPin1 =  7;
const int ledPin2 =  16;
const int ledPin3 =  9;
const int ledPin4 =  14;
const int ledPin5 =  10;
const int redPin6 =  12;
const int ledPin7 =  11;
const int ledPin8 =  13;
const int ledPin9 =  15;
const int ledPin10 =  8;
const int ledPin11= 17;
int buttonState = 0;

void AllOff()
{
for (int i = 18; i > 6; i--)
{
digitalWrite(i, LOW); // Turn off all LEDs
}
}

void LightUpwards()
{
for (int i = 18; i > 6; i--)
{
digitalWrite(i, HIGH); // Turn on LED on pin i
delay(1000);
digitalWrite(i, LOW);  // Turn off LED on pin i
}
}

void LightDownwards()
{
for (int i = 7; i < 19; i++)
{
digitalWrite(i, HIGH); // Turn on LED on pin i
delay(1000);
digitalWrite(i, LOW);  // Turn off LED on pin i
}
}
void setup() {
//Input or output?
for (int i = 18; i > 6; i--)
{
pinMode(i, OUTPUT); // Digital output to LEDs on pins 10 ... 14
}

pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
}

void loop(){
//Read button state (pressed or not pressed?)
buttonState = digitalRead(buttonPin1);
if (buttonState==HIGH)
{
AllOff();
LightUpwards();
AllOff();
}
else
{
AllOff();
}
buttonState = digitalRead(buttonPin2);
if (buttonState==HIGH)
{
AllOff();
LightDownwards();
AllOff();
}
else
{
AllOff();
}
}

# data[].attributes.attachment_link.title
N84 Teensy Controlled Flashing LED Board

# data[].attributes.body
Use this template to plan your vero board layout

# data[].attributes.body
https://www.pjrc.com/teensy/first_use.html

# data[].attributes.attachment_link.title
Getting started with Teensy USB development board

# data[].attributes.attachment_link.description
If your Teensy should blink but does not, please check the USB cable to make sure it is properly connected. Your computer must be on so it provides power to the USB port. If you still experience problems, try a different USB port or different computer.

# data[].attributes.body
https://www.arduino.cc/en/Main/Software

# data[].attributes.attachment_link.description
Open-source electronic prototyping platform enabling users to create interactive electronic objects.

# data[].attributes.body
https://www.pjrc.com/teensy/loader.html

# data[].attributes.attachment_link.title
Teensy Loader Application - available for Windows, Linux and Macintosh systems

# data[].attributes.headline
Set the Void loop() to run repeated : This sample code below flashes the 10 LEDs in one direction

# data[].attributes.subject
Set the Void loop() to run repeated : This sample code below flashes the 10 LEDs in one direction

# data[].attributes.body
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(pushbutton1)==HIGH &&  digitalRead(pushbutton2)==LOW) // Check whether which button is pressed
{
digitalWrite(LED1, HIGH); //Set LED1 to ON
delay(500); // Wait for 500 count
digitalWrite(LED2, HIGH);
delay(500);
digitalWrite(LED3, HIGH);
delay(500);
digitalWrite(LED4, HIGH);
delay(500);
digitalWrite(LED5, HIGH);
delay(500);
digitalWrite(LED6, HIGH);
delay(500);
digitalWrite(LED7, HIGH);
delay(500);
digitalWrite(LED8, HIGH);
delay(500);
digitalWrite(LED9, HIGH);
delay(500);
digitalWrite(LED10, HIGH);
delay(2000);
digitalWrite(LED1, LOW); //Set LED1 to OFF
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED8, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10,LOW);
delay(1000);
}
else
{
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED8, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10, LOW);
}

# data[].attributes.headline
Set the Void setup() to run once - This sample code define the type of PIN behavior for the identified pins of the Teensy module.

# data[].attributes.subject
Set the Void setup() to run once - This sample code define the type of PIN behavior for the identified pins of the Teensy module.

# data[].attributes.body
void setup() {
// initialze the digital pin as an output
pinMode(pushbutton1,INPUT);
pinMode(pushbutton2,INPUT);
pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);
pinMode(LED4,OUTPUT);
pinMode(LED5,OUTPUT);
pinMode(LED6,OUTPUT);
pinMode(LED7,OUTPUT);
pinMode(LED8,OUTPUT);
pinMode(LED9,OUTPUT);
pinMode(LED10,OUTPUT);
}

# data[].attributes.headline
Set the Constants : This sample code define the constant (in this case the PIN number of the Teensy module are assigned to a defined constant)

# data[].attributes.subject
Set the Constants : This sample code define the constant (in this case the PIN number of the Teensy module are assigned to a defined constant)

# data[].attributes.body
const int pushbutton1 = 19;
const int pushbutton2 = 20;
const int LED1=6;
const int LED2=7;
const int LED3=8;
const int LED4=9;
const int LED5=10;
const int LED6=11;
const int LED7=12;
const int LED8=13;
const int LED9=14;
const int LED10=15;

# data[].attributes.body
//1_Set the Constants
const int
void setup() {
//2_ Put your setup code here, to run once:

}

void loop() {
// 3_Put your main code here, to run repeatedly:

}

# data[].attributes.headline
Teensy Flashing Light Board - Bread Board Stage 

# data[].attributes.subject
Teensy Flashing Light Board - Bread Board Stage 

# data[].attributes.headline
Xu Jie’s Christmas Tree Flashing LED Board 

# data[].attributes.subject
Xu Jie’s Christmas Tree Flashing LED Board 

# data[].attributes.attachment_link.title
CEM17 Xu Jie ‘s Teensy Controlled LED Flashing Light Board

# data[].attributes.attachment_link.description
All CEM students at NP gets to build their first Teensy controlled project and keep it. They will then build on this first project into more complex project.

# data[].attributes.headline
Justin B’s 3D Flashing LED Lattice Board

# data[].attributes.subject
Justin B’s 3D Flashing LED Lattice Board

# data[].attributes.attachment_link.title
N84 CEM@NP CEM17 Flashing Light TEENSY project by JUSTIN B

# data[].attributes.attachment_link.description
All CEM students at NP gets to build their first Teensy controlled project and keep it. They will then build on this first project into more complex project.

# data[].attributes.headline
Arduino Garden Controller - Automatic Watering and Data Logging

# data[].attributes.subject
Arduino Garden Controller - Automatic Watering and Data Logging

# data[].attributes.body
https://youtu.be/O_Q1WKCtWiA

# data[].attributes.attachment_link.title
Arduino Garden Controller - Automatic Watering and Data Logging

# data[].attributes.attachment_link.description
Gardening in the modern age means making things more complicated and arduous, with electrons, bits, and bytes. Behold: the garduino. My brother got me an arduino microcontroller board for Christmas, which to me was a solution looking for a problem. I finally found the problem: fresh herbs are expensive at the grocery store.