[go: up one dir, main page]

0% found this document useful (0 votes)
6 views3 pages

Exercise 1

The document outlines three exercises for creating basic Arduino circuits using Tinkercad. Exercise 1 involves blinking an LED, Exercise 2 simulates a traffic light system, and Exercise 3 controls an LED with a push button. Each exercise includes objectives, circuit setup instructions, and programming requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Exercise 1

The document outlines three exercises for creating basic Arduino circuits using Tinkercad. Exercise 1 involves blinking an LED, Exercise 2 simulates a traffic light system, and Exercise 3 controls an LED with a push button. Each exercise includes objectives, circuit setup instructions, and programming requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EXERCISE 1

BLINK LED https://www.tinkercad.com/things/gwIKqARxzTv-blinking-of-led

EXECRCISE 2

TRAFFIC LIGHT: https://www.tinkercad.com/things/0dmkuHTXj4h-traffic-lights

Exerrcise 3

LED CONTROLLED WITH PUSH BUTTON

OBJECTIVES

To create elementary Arduino circuits.

To be familiar with Programming using blocks.

To manage electronic elements as resistors, leds, breadboard

Exercise 1 LED
Using Tinkercad circuits, create a circuit with arduino UNO, a breadboard, and a led connected to
Arduino digital pin

write down a program that makes the led blinks once per second.

Simulate the circuit in Tinkercad

What is the resistor value and why?

Exercise 2 Traffic Lights


In Tinkercad circuits, create a circuit with Arduino UNO, a breadboard, and three leds (red, yellow,
green)

The green light will be on 10s, then the yellow light will blink 10 times and then the red light
will be on 10s

Simulate the circuit in Tinkercad


Exercise 3: Control Led with a push Button
create a circuit with Arduino UNO, a breadboard, a led and a push button to switch on/off

write down a program that waits the user to push and then changes the state of the led
(on/off).

Code

// Pin 13 has an LED connected on most Arduino boards.

// give it a name:

int led = 13;

int pushButton = 2;

// the setup routine runs once when you press reset:

void setup() {

Serial.begin(9600);

pinMode(pushButton, INPUT);

pinMode(led, OUTPUT);

// the loop routine runs over and over again forever:

void loop() {

int buttonState = digitalRead(pushButton);

Serial.println(buttonState);

if (buttonState == 1) {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)

} else {

digitalWrite(led, LOW); // turn the LED off by making the voltage LOW

delay(1); // delay in between reads for stability

You might also like