1. Let’s get familiar with the Arduino programming environment (IDE). This is a free software you can download and install on your computer from: https://www.arduino.cc/en/Main/Software
2. Open Arduino by double clicking (or clicking if on a Mac) the “infinity symbol.” This should bring you to a blank “sketch”.
3. Connect your Arduino board to your computer using the USB cable.
4. In Arduino, select File->Examples->Basic->Blink
5. Now you have the example ‘Blink’ loaded. This code simply switches the built-in LED light on your Arduino board on and off to give a blinking effect. Check to see if the loaded ‘Blink’ code compiles. Press the play icon named “Verify.” This will check for errors and compile your code.
6. Use the “tools” menu to check the port to which the Arduino board is connected. Once the right port is selected, it is possible to upload sketches to Arduino.
7. Now click the upload icon to upload the code to the Arduino board. If you get an error, check to be sure you’ve selected the correct device and port.
References : https://www.arduino.cc/en/tutorial/blink
Welcome to Arduino!
Arduino is an electronic prototyping platform. Different types of sensors & actuators can be attached to Arduino boards to create our own sensing-thinking-acting systems.
Throughout this unit, we will use Arduino to create different sensing devices, and to retrieve the collected sensor data.
In this task, we will try out an introductory exercise, to learn the basic concepts of Arduino.
Arduino programming environment
Here are the pre-lab materials for our first task:
There are six questions in this task. Answer all of them in this word document itself and submit to unit site.
Q1: The TED talk given under the Pre-Lab materials, shows how Arduino is being used for interesting projects to capture data from the environment, process it, and use it carry out useful actions.
Fill the given table below to answer the following:
What are three projects that use captured data as given in the TED talk? What data do they capture? What sensors do you think they could use to capture this data?
Sensors to capture the data
Q2: Consider the given Task Objective. Think about how this simple system can be decomposed to ‘Sense-Think-Act’ as discussed in class (lecture).
Q3: Please refer to the provided ‘Arduino Blink Activity Sheet’ and follow the steps.
Q4: How can you test the Blink program to make sure it is working as given in the Task Objective?
Q5: Now that you have built and tested your Blink program, it is time to deliver it (hand it it over). Take a five second video of your Arduino board with the LED blinking (use your phone to record) and upload it to youtube. Include the link here. Alternatively, if you are on campus, show your working project to your tutor in the lab and get it marked.
Q6: The Morse code is a method of transmitting text information as a series of on-off lights, or clicks.
Upload the ‘BlinkSOS.ino’ file with this document to cloud Deakin.
Hints for Q6:
SOS signal in Morse Code: https://www.youtube.com/watch?v=GnHv7h_5P9M
Use the International Morse code given here: https://en.wikipedia.org/wiki/Morse_code#/media/File:International_Morse_Code.svg
More information about Morse Code: https://en.wikipedia.org/wiki/Morse_code
Here is a sample code snippet signalling the letter ‘S’ below:
/** * First signal 'S' * Morse code for S is - - - * that is, three short blinks. */ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(500); // wait for half a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(500); // wait for half a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(500); // wait for half a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second
Use your knowledge from the first task, and lecture to decide where the above should go in your code. You now have ‘S’. Next you must write for letters ‘O’ and again ‘S’.