REPORT PRACTICE 2 NATALIA GALÁN
PROJECT REPORT PRACTICE 2
Natalia Galán 3ºF
DESCRIPTION:
turning on an LED by pressing a push button, When you press the push button the LED lights up for 3 seconds
DESIGN

Program code
int push_button = 2;
int LED = 3;
void setup()
{
pinMode(LED, OUTPUT);
pinMode(push_button, INPUT);
}
void loop
{
if (digitalRead(push_button) == HIGH)
{
digitalWrite(LED, HIGH);
}
else {
digitalWrite(LED, LOW);
}
}
CONSTRUCTION
SELF-EVALUATION
At first it was a bit difficult for us to understand how did it work, but with some time we could understand it.
EMBEDDED SIMULATION
Natalia Galán 3ºF
DESCRIPTION:
turning on an LED by pressing a push button, When you press the push button the LED lights up for 3 seconds
DESIGN
| Circuits.io Bill Of Materials | ||
| IDS | # | Component |
| D1 | 1 | LED |
| U1 | 1 | Arduino Uno R3 |
| R1 | 1 | Resistor 220 ohm |
| R2 | 1 | Resistor 1k ohm |
| S1 | 1 | Pushbutton |
lab view

schematics view
Program code
int push_button = 2;
int LED = 3;
void setup()
{
pinMode(LED, OUTPUT);
pinMode(push_button, INPUT);
}
void loop
{
if (digitalRead(push_button) == HIGH)
{
digitalWrite(LED, HIGH);
}
else {
digitalWrite(LED, LOW);
}
}
CONSTRUCTION
SELF-EVALUATION
At first it was a bit difficult for us to understand how did it work, but with some time we could understand it.
EMBEDDED SIMULATION


Comentarios
Publicar un comentario