Introduction

What is an Arduino?

If we are to hear a loud bang while walking to school, we would immediately shriek out "What was that sound?!". If we are to investigate further, there is a process which happens within our body in this situation:
  1. A loud bang is sounded.
  2. Our ears pick up the sound.
  3. Our brain analyses and responds to the sound.
  4. Our brain instructs us to shriek out "What was that sound?!".
Arduino mimics the brain in our body to analyse and respond to the external environment, such as sound in this case. The objects involved in the 4 individual processes above can be stated in robotic terms as follows:
  1. A loud bang: INPUT
  2. Our ears: SENSOR
  3. Our brain: ARDUINO
  4. "What was that sound?!" shriek: OUTPUT
Arduino is made up of a computer (a chip on the board) and code (computer language). 01 02

Download drivers

In order to get your computer to recognize your Arduino, you would need to download its drivers.
  1. Download the drivers from: https://drive.google.com/file/d/0BxpHyhcNd5NbblNYUGdRSEY0Zk0/view?usp=sharing. Right click on the file downloaded and click on Extract All. Click on Extract.
  2. Plug in your Arduino to your computer.
  3. Go to Start and search for Device Manager.
  4. Look under Ports (COM & LPT). It should be either Arduino XXX (COMx) or USB Serial Port (COMx). Else, it would be under Other Devices as Unknown Device.
  5. Right click on any one of the names in the step above and choose the "Update Driver Software" option.
  6. Choose the "Browse my computer for Driver software" option.
  7. Navigate to and select the driver file named "arduino.inf" located in the Drivers folder extracted in Step 1.
  8. Windows will finish up the driver installation from there.

Setup Soapbox Robotics compiler

  1. Go to http://beta.soapboxrobotics.com/compiler.php to launch the compiler.
  2. Install the CodeBender extension when prompted.
  3. Go to settings and define the following:
    1. COM port: If you have multiple ports, disconnect your Arduino and re-open the menu. The entry that disappears should be the target Arduino board. Reconnect the board and select that COM port.
    2. Board type: Arduino UNO is the commonly used board.
    3. Baud rate: 9600 is the default
  4. The graphical user interface is made up of the following:
    1. Blocks organized by categories
    2. Canvas which can be populated by the blocks
    3. Command ribbon to save, open, compile blocks, upload blocks and settings
    4. Code editor to generate Arduino code from blocks, edit the code manually, compile the code and upload the code
    5. Serial monitor for serial communications with Arduino
    6. Help which consist of getting started page and language/block reference
03

Upload your first program!

Let's now upload your first program by controlling the lighting of the LED on your Arduino. Most Arduino boards have an LED attached to pin 13 on the board itself, indicated by letter "L".
  1. Plug your Arduino into your computer.
  2. Drag the DigitalWrite block from Output category into the canvas.
  3. Change the pin to 13 and the state to HIGH.
  4. Ensure that you have the COM port, board and baud rate configured through Settings.
  5. Click on Upload.
  6. Once you have finished uploading, it will prompt "Verification successful".
  7. The LED on your board (indicated by "L") will now be continuously turned ON.
You can then move on to blinking your LED by:
  1. Drag the DigitalWrite block from Output category into the canvas.
  2. Change the pin to 13 and the state to HIGH.
  3. Drag Delay from Time category and snap it right below DigitalWrite.
  4. Drag "0" from Constant category and snap it inside Delay. Change from 0 to 1000.
  5. Drag another DigitalWrite block from Output category into the canvas.
  6. Change the pin to 13 and the state to LOW.
  7. Drag Delay from Time category and snap it right below DigitalWrite.
  8. Drag "0" from Constant category and snap it inside Delay. Change from 0 to 1000.
  9. Click on Upload.
  10. The LED on board will now be blinking in intervals of 1000 milliseconds (or 1 second).
4