B. User Manual

  1. Plug the Power Supply into the outlet/power strip.
  2. Ensure that the power strip is turned on.
  3. Ensure the black power cord is plugged into the red and black power cable coming out of the side of the train set. Note: Do not plug this directly into the Arduino.
  4. Plug the Arduino USB cord into the computer.
  5. Download the folder “Team01_Train Crossing_Folder” and save it to your computer.
  6. Ensure that the red LEDs on the Break beam sensors are on. Ensure that the yellow LEDs on the Arduino are on as well. This means that these devices have power.
  7. Open the file “Team01_Train Crossing_Code.m”.
  8. Open the Windows Device Manager. To open the Windows Device Manager, click on the start menu, then in the search box type ‘device manager’ and press the enter key. You will receive an error message, click OK.
  9. Once the Device Manager has opened, click on the arrow next to Ports (COM & LPT). Once the Arduino has finished installing, look for Arduino UNO (COM#) in the list.
  10. In MATLAB, find the change folder icon, which is located toward the left side of the screen, just above the words “Current Folder”.
  11. Click change folder and find the the folder “Team01_Train Crossing_Folder”. Select it and click change folder. This tells MATLAB to work out of the train simulator folder.
  12. On the MatLab file “Team01_Train Crossing_Code.m”, click on the green play button on the top to run the code.
  13. When prompted, enter 1 or 0 appropriately, if the train is in the rural or urban setting.