by Adwoa Asare

Arduino and LEDs

In today’s lab I:

  • made a circuit with an arduino uno
  • sautered an arduino nano
  • made a circuit with an arduino nano
  • programmed an arduino nano

Materials needed:

  • arduino nano
  • arduino uno
  • (3) 100 ohm resistors
  • bread board
  • plugin wires for bread board -wire stripper
  • 3 LEDs
  • sautering gun
  • sauter
  • usb to mini cable
  • usb cable
  • power source

Arduino uno circuit

  1. (2) Wires were stripped, one red and one black
  2. The black wire was connected to the ground (GND) plugin on the arduino uno
  3. The red wire was connected to the 5v output on the arduino uno
  4. The wires and components were plugged into the breadbord as shown:

parallel series lit board

This idea can be expanded by adding another LED in parallel:

Arduino Nano Circuit

  1. The arduino nano parts were placed on the breadboard for stablization then sautered on
  2. The arduino nano was then secured onto the center section of the breadboard
  3. The circuit was put together as shown: Board Traces

  4. The following code was used th make the lights blink in a successive pattern:

int led_blue=5;
int led_white=4;
int led_green=3;

void setup() { // put your setup code here, to run once:
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(led_blue,OUTPUT);
  pinMode(led_white,OUTPUT);
  pinMode(led_green,OUTPUT);

}//void setup()

void loop() { // put your main code here, to run repeatedly:
  
  digitalWrite(LED_BUILTIN, HIGH); // turn the LED on by aking the voltage HIGH
  
  digitalWrite(led_green,HIGH);
  
  delay(200);
 
  digitalWrite(led_white,HIGH);
  
  delay(200);                       
  
  digitalWrite(led_blue,HIGH);
  
  delay(200);  
  
  digitalWrite(led_green,LOW);
  
  delay(200);  
  
  digitalWrite(led_white,LOW);
  
  delay(200);                       
  
  digitalWrite(led_blue,LOW);                     
  
  digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
}//void loop()