Inputs and outputs: button
Turn a led on when pressing a button
What are we going to do?
In this activity you'll write some code that turn a led on o off when a button is pressed.
You can find this code under Arduino IDE -> File -> Examples -> Digital -> Button
Let's get started
Follow these instructions carefully. You can click on some of the images to zoom in.
Always connect the components BEFORE powering the UNO board or YOU MAY DAMAGE YOUR BOARD OR COMPONENTS.
Now, what else?
Now is your turn:
- In step 4 of the instructions says you have to modify the code in order to make it work, what did you change?
- Use your favourite browser to search for the difference between an input and an output.
- Write some examples of inputs and outputs
- Think about how would you modify the code so the button acts the other way around, with the LED on when not pressed and off when pressed.
- I challenge you to modify the code, so the push button acts like a switch, keeping its state until it is touched again.
- brick: block of rectangular shape. (bloque, módulo)
- pressed: push, Example: He pressed against the table to get it to move. (presionar)
- challenge: dare to do a difficult task (retar, desafiar)
- the other way around: reversed (al contrario)
- switch: electricity: on-off control. Example: The light switch is on your right (interruptor)
- state: condition (estado)
- They are similar because...
- They are different because...
- One of them ... while the other...
- One input example is...
- A good example of an ouptut is...
Still need help?
First raise your hand and then...
Asking for general help
- Excuse me, I need help.
- Please, could someone help me?
- I have problems with this activity.
- This part is keeping me from finishing the activity
- How do I do that?
- What's the meaning of...?
- How do you say... in English?
- What does... mean?
- I don't understand this sentence/word/part...
Need more help? check these online dictionaries