Top Banner
>_ Things Lab An hour of Arduino and Ardublock Introductory workshop Computer Science Education Week Week of Code in Things Lab
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Hour of Arduino and Ardublock

>_ Things Lab

An hour of Arduino and Ardublock

Introductory workshop

Computer Science Education Week

Week of Code in Things Lab

Page 2: An Hour of Arduino and Ardublock

What is Arduino?

• Arduino is a a single board microcontroller and also an Open Source development environment, used to create functional and creative projects (also a powerful base platform for DIY projects).

Page 3: An Hour of Arduino and Ardublock
Page 4: An Hour of Arduino and Ardublock
Page 5: An Hour of Arduino and Ardublock

Components

• Arduino is attached to a breadboard and connected to a computer via a USB cable.

• Components we are going to use for the workshop include: LEDs, resistors (330 and 10K ohms), photoresistors, wires, but there are a lot of other ones.

Page 6: An Hour of Arduino and Ardublock
Page 7: An Hour of Arduino and Ardublock

Ardublock

• Arduino is programmed in a language based on C, called Wiring.

• Today we are not going to learn to actually program Arduino using Wiring, but something much simpler and fun, called Ardublock.

• It is a graphical programming environment used to make the Arduino programming as simple as drag and drop.

Page 8: An Hour of Arduino and Ardublock

How to get Arduino IDE and Ardublock?

• Link for dowloading Arduino IDE:

http://arduino.cc/en/main/software

• Link for dowloading Ardublock:

http://blog.ardublock.com/engetting-started-ardublockzhardublock/

Page 9: An Hour of Arduino and Ardublock

Installing Ardublock…

• Open C:\Users\<username>\Documents\Arduino

• Create a folder named ‘tools’, inside it create a folder named ‘ArduBlockTool’, againg, inside it create a folder named ‘tool’ and copy there the ardublock-all.jar files.

• !!! Careful, the folder names are case-sensitive!!!

Page 10: An Hour of Arduino and Ardublock

• Open Arduino IDE. Under the menu <Tools> you should have ArduBlock. Click it and… Voila! Let the fun begin

Page 11: An Hour of Arduino and Ardublock

Hello, world! | Blinking Led

Page 12: An Hour of Arduino and Ardublock

ArduBlock scheme

Page 13: An Hour of Arduino and Ardublock

Traffic Light? Challenge accepted!

• Now that you’ve learn how to turn ON and OFF a LED, you can make a traffic light using three ones.

• The logic goes this way: each LED is connected to a digital pin, e.g #1, #2, #3. At first, all LEDs are off. Then, #1 is ON, others still OFF. #2 becomes ON, #1 goes OFF. #3 goes ON, #2 goes OFF. Can you make it?

Page 14: An Hour of Arduino and Ardublock

You’ve got 15 minutes!

• The one that finishes first, meaning scheme done right and code working, will get a COOL PRIZE!

• 20, 19, 18 …

Page 15: An Hour of Arduino and Ardublock

One of a lot of possible solutions

Page 16: An Hour of Arduino and Ardublock

Photoresistor

Page 17: An Hour of Arduino and Ardublock
Page 18: An Hour of Arduino and Ardublock
Page 19: An Hour of Arduino and Ardublock

• An alternative of Ardublock is BlocklyDuino. Link: http://www.gasolin.idv.tw/public/blockly/demos/blocklyduino/index.html

• Now that you’ve got some basics of Arduino, you can start to program it using real code and explore more by yourself. You can find a lot of tutorials/examples/schemes/code online.

Page 20: An Hour of Arduino and Ardublock

Thank you for your time and attention!

• >_ Things Lab

• Week of Code, 10th December 2014

• Computer Science Education Week