TA Resources: Garage Demos

Getting started

  1. Be sure students have updated the files to use the Real garage API and have disabled their proxy.
  2. Be sure students have reprogrammed the firmware on the Photon.
  3. Remote the Photon from the students test setup.
  4. Make sure the power switch on the bottom of the controller board is ON.
  5. Make sure the lever on the socket is UP:
    Garage Board
  6. Put the Photon in the Socket with the USB connector pointing outward.
    Garage Board
  7. Pull down the handle on the socket.
  8. Plug the USB cable between a computer and the Arduino Pro Micro (to see warning/error messages and to be able to override garage controls). Use the Arduino Serial Monitor (9600 baud).
  9. Do Demo. Review feedback given in the Arduino Serial Monitor and intervene as necessary
    • Monitor indicates when it appears timing constraints have been violated, but it isn’t accurate when cloud functions may have intervened.
    • Single letter commands can be entered to interact with the garage:
      • ?: List these commands
      • s: Show the status of all inputs for 5s. This can be used to verify that sensors/buttons are working.
        • Example: Occasionally the laser isn’t aligned with the received, which would be detected as a fault (and may only happen when the door is in motion).
      • o: Completely open the door. This may be necessary if the students’ firmware makes errors guessing the initial state of the door or is out-of-sync.
      • c: Competely close the door. Same as above.
      • l: Light the light for 2s to verify it works.
    • Errors include:
      • EMERGENCY STOP! Error --- Fault due to motor obstruction: The motor was still active more than 800ms after the door stopped moving. This isn’t usually detectable by student code and often is a result of forgetting to turn on the battery. (The Arduino stopped the motion, not the Photon; See Trouble Shooring)
      • EMERGENCY STOP! Error --- Opening even though contact hit: The motor was still active more than 600ms after the door hit “open” the contact. (The Arduino stopped the motion, not the Photon; See Trouble Shooring)
      • EMERGENCY STOP! Error --- Closing even though contact hit: The motor was still active more than 600ms after the door hit “close” the contact. (The Arduino stopped the motion, not the Photon; See Trouble Shooring)
      • EMERGENCY STOP! Error --- Fault due to beam obstruction: The motor was still active more than 600ms after the beam was obstructed. (The Arduino stopped the motion, not the Photon; See Trouble Shooring)
      • Fault due to motor obstruction: Not really an error, just indicating that a fault occurred due to the door hitting something.
      • Possible Error: Door motion less than 100ms after button: The door started opening quickly after the button was pressed. This is usually an error in the students timing, but could also be due to a cloud-based activation right as a button was pressed.
      • Possible Error: Door motion more than 150ms after button: If the test involved using the button to open the door, this indicates an error in timing. (It should be ignored for cloud-based tests)
      • Possible Error: Door motion stopped more than 200ms after button: If the test involved using the button to open the door, this indicates an error in timing. (It should be ignored for cloud-based tests)
      • Possible Error: Door motion stopped more than 200ms after button: If the test involved using the button to open the door, this indicates an error in timing. (It should be ignored for cloud-based tests)
      • Possible Error: Door motion stopped more than 200ms after hitting open switch: This indicates an error in timing.
      • Possible Error: Door motion stopped more than 200ms after hitting close switch: This indicates an error in timing.
      • Possible Error: Door motion stopped more than 200ms after fault: This indicates an error in timing.
      • DEBUG: : These are debugging messages sent by student code via the sendDebug() function.
  10. Remove the USB cable to power down the Arduino and Photon.
  11. Raise the lever to release the Photon.
  12. Remove the Photon.

End of day

  1. Be sure the power switch on the Garage is Off
  2. Put Garages in Cabinet
  3. Lock cabinet.

Trouble Shooting