Hello world with Arduino: Blink 1


Hello world with Arduino: Blink

There's always a first time

What are we going to do?

In this activity you'll program your first Arduino code.

This code turns a LED on for a second, then off for one second, repeatedly. You can find this code under Arduino IDE -> File ->Examples -> Basics ->Blink

You don't need any extra components as it uses a LED connected to pin13 that most Arduino boards have.

UNO board

You can use any Arduino UNO original or compatible board

USB cable

Depending on your board, you'll need a microUSB cable or a miniUSB cable

Computer

You need a computer with Arduino IDE software. If you don't have it, follow this link with instructions to download and install it.

Download Arduino IDE

Let's get started

Follow these instructions carefully. You can click on some of the images to zoom in.

In this case, you don't need to connect any extra components, just the UNO board and the USB cable.

Instructions

1 Open Arduino IDE

Once you've opened the editor, open the blink example from File->Examples->Basics->Blink

2 Connect your board

Connect your board with USB cable and wait a bit until you computer recognises it. Now select the correct serial port from Tools->Serial port->(choose correct port) COM1, 2, 3...

Click to zoom

3 Upload to the board

Use the upload button to transfer the program to your board. Once done, you should read Upload completed. That means the transfer was succesful. If it's not succesful, try disconnecting your board and connecting it again and repeating the upload process.

4 Final result

It everything worked correctly, you should see a LED blinking on your board.

You've done it! You're on the right path to be a maker! ūüôā

Now, think about how would you modify the code so the time interval changes.

Now, what else?

Now is your turn:

Questions:

  1. What happened? What's the Arduino doing? (you can use expressions from language scaffolding).
  2. What's the command that turns the LED on?
  3. What's the command that changes the blinking time?

Activities:

  1. Change something in the code so the LED turns on and off with different time intervals.
  2. Change the code so the led only turns on for 2 seconds and then it stays off forever (until you reset the board).
  3. Change the code so the led stays 4 seconds off, then 4 seconds on and then it blinks with a 1seg interval.
 

Language scaffolding

Vocabulary

  • command: in computer programming, a command means telling the compter to do something. (comando, orden)
  • code: computer program. Example:¬†There is an error in the code somewhere; I just haven't found it yet. (c√≥digo)
  • LED: inititalism¬†(light-emitting diode) (LED, diodo electroluminiscente)
  • blink: light go on, off. Example:¬†The lights blinked as the storm raged on outside. (parpadear, brillar intermitentemente)
  • recognize: identify. Example: the computer recognized the usb drive (identificar)

Useful expressions

  • This command turns a LED on/off
  • The command to ... is ...
  • To change the blinking time we use ...
  • To pause the program we use ...
  • When the Arduino starts, the LED blinks
  • The led is always blinking
  • The LED blinks¬†indefinitely

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?

Vocabulary problems

  • 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


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

One thought on “Hello world with Arduino: Blink