Controlling LED using argon board

Made by Rahul Jha

First Sketch: Making an LED Blink. The goal is to create my first circuit, create a short program and control some components with code.

Created: November 11th, 2021

0

Outcome

Detail The outcome itself, a description of it, and how it works. Include supporting images, a video of the working prototype, circuit diagrams, etc.). Describe any experiments or explorations you undertook.

Building the Circuit:

Used Leds, jumper wires argon microcontroller to create simple LED circuit.


0

Code for Ex0: First Sketch: Making an LED Blink

0
int led1 = D2;

void setup() {
    
    pinMode (led1, OUTPUT);
    
}

void loop() {
    
    digitalWrite(led1, HIGH);
    delay(1000);
    digitalWrite(led1, LOW);
    delay(1000);
    
}
Click to Expand
0

VideoLink for Ex0: First Sketch: Making an LED Blink

https://youtu.be/v6vKhiYbVfs


0
SkillDev1 1
rahuljha89 - https://youtu.be/v6vKhiYbVfs
0

Code for Ex1: Modify the program to Blink on and off every 3 seconds.

0
int led1 = D2;

void setup() {
    
    pinMode (led1, OUTPUT);
    
}

void loop() {
    
    digitalWrite(led1, HIGH);
    delay(3000);
    digitalWrite(led1, LOW);
    delay(3000);
    
}
Click to Expand
0

VideoLink for Ex1:
https://youtu.be/sChxMvoB9lI 

0
SkillDev1_2
rahuljha89 - https://youtu.be/sChxMvoB9lI
0

Code for Ex2: Change the program to blink on and off 5 times then stop for 3 seconds. Each blink should be 0.5s (a half second)

0
int led1 = D2;

void setup() {
    
    pinMode (led1, OUTPUT);
    
}

void loop() {
    
   for(int i=0; i<5; i++){
        digitalWrite(led1, HIGH);
        delay(500);
        digitalWrite(led1, LOW);
        delay(500);
   }
   delay(3000);
   
}
Click to Expand
0

VideoLink for Ex2:
https://youtu.be/37I9rjpqEW0


0
SkillDev1_3
rahuljha89 - https://youtu.be/37I9rjpqEW0
0

Code for Ex3: Go back to the original program. Now add a second LED to the circuit.

0
int led1 = D2;
int led2 = D3;

void setup() {
    
   pinMode (led1, OUTPUT);
   pinMode (led2, OUTPUT);
    
}

void loop() {
    
    digitalWrite(led1, HIGH);
    digitalWrite(led2, LOW);
    delay(1000);
    digitalWrite(led1, LOW);
    digitalWrite(led2, HIGH);
    delay(1000);
    
}
Click to Expand
0

VideoLink for Ex3:

https://youtu.be/v3F4qukRPzo


0
SkillDev1_4
rahuljha89 - https://youtu.be/v3F4qukRPzo
0

Process 

If appropriate, if you ran into difficulties and/or if you experimented (went beyond the materials), describe how you arrived at the outcome. Outline the process you underwent to reach the outcome (experiments, hacks, tests, refinements, iterations, failures)
I went through the slides and reading material. Followed the instructions. I enjoyed the circuit designing part. Experimented a bit by moving connections here and there and tried to understand the effect of different sections. Connected two LEDs to different pins. Also, tried connecting two LEDs to the same pin using the series connection. Observed that LED was blinking very dim due to low current.

0

Reflection

Reflect on the process of making this project. What did you learn? What would you do differently?

I went through the slides and reading material. Followed the instructions. I got to revisit the concept of LED and its different types. Also, got the concept of using a breadboard. Most importantly, learn the concept of microcontrollers and their different pins- digital/analog and input/output. Powering and grounding of microcontroller and whole circuit.

x
Share this Project

Courses

About

First Sketch: Making an LED Blink. The goal is to create my first circuit, create a short program and control some components with code.