MortiSafe - Testing the Arduino

From MortiWiki

This page is about testing the parts you have bought to <a href="/index.php/Build_a_MortiSafe" title="Build a MortiSafe">Build a MortiSafe</a>.

First you need to download the following software:

  1. Some software for working the Arduino. Download from <a href="http://www.arduino.cc/files/arduino-0012-win.zip" class="external text" title="http://www.arduino.cc/files/arduino-0012-win.zip" rel="nofollow">here</a>
  2. Some software for <a href="/index.php/MortiSafe_Software" title="MortiSafe Software">controlling the MortiSafe</a>

Then you need to:

  1. Expand the downloaded ZIP file, arduino-0012-win.zip. I'm going to assume you're going to expand it into "C:\Program files", if you put it somewhere else then change the instructions below accordingly
  2. Install the FTDI driver, which lets your PC talk to the Arduino as though it's on a serial port (even though it's on USB). To do this, go <a href="http://arduino.cc/en/Guide/Windows" class="external text" title="http://arduino.cc/en/Guide/Windows" rel="nofollow">here</a> and follow steps 3 and 4 (locating the USB driver and connecting the board). Ignore sections 5 and later (unless you're interested)
  3. This has assigned a serial port to the Arduino, but you have to find out which one. Go to Device Manager (run Control Panel, System, click on 'Hardware', click 'Device Manager', open up "Ports (COM & LPT)" and you should see something like "USB Serial Port (COM3)". The 'COM3' is the name of the serial port that your Arduino is connected to (see the 'device manager' picture under step 7 <a href="http://arduino.cc/en/Guide/Windows" class="external text" title="http://arduino.cc/en/Guide/Windows" rel="nofollow">here</a>)

Next, you can test the Arduino before you build the rest of the safe. This is because there's a green light on the board (marked '13' on the picture below) which is lit when the safe is locked and off when it's unlocked, which means you can test the lock/unlock process before you build the rest. ArduinoDiecimilaComponents.jpg

You should already have the Arduino connected to the PC with a USB cable.

To test it:

  1. Run MortiSafe.exe
  2. Click the 'Test safe' button
  3. Fill in the 'Path to Arduino' box
  4. Choose your COM port from the list (see instructions about Device Manager above)
  5. Click 'Upload Blink' - this uploads a program to the Arduino which just flashes the green light (and locks/unlocks the safe) once a second
  6. If this works okay, click 'Upload MortiSafe' - this uploads the main MortiSafe program
  7. Click on 'Lock' and the light will go on
  8. Click on 'Unlock' and the light will go off