F. Discussion

Once the Train was started, the safe start feature kicked in that way if the train happened to be close to the station or the road the crossing would go down and the lights would flash. This gave vehicles the warning they needed in order to stop before the train approached. Furthermore, the train had two gates to pace through which were called the approach and departure gate. When the train hit the approach gate it slowed down, and the crossing gates lights started flashing followed by the guards coming down. Once the train hit the departure gate, the lights quite flashing and the guards came up as the train then picked up speed.

The MATLAB code consisted of three days however the team was in the lab more than that testing code. Furthermore, the team started out coding the Arduino and getting the train to run. Next came the lights and the crossing guards getting those to work properly took some time. Following was the coding of the trains speed and getting it to slow down and speed up depending on which gate it hit. Finally, the last code that was written was getting the train simulator to recognize if the train was in an urban or rural setting and getting the safe start to run.

During the train lab the team faced many problems. The biggest was setting a delay on the train for the crossing guards and then getting the lights on the crossing guards to blink consistently. To fix this issue, an LED flag was put in and different variables were added to get the consistence needed. Another problem that was faced was once the team added the safe start feature, the simulator was overloaded and kept breaking. However, this was easily fixed when Tj and Tony put their heads together and went through it with the team and we found the problems needing fixed.