G. List of Figures and Tables

 

Important Miscellaneous Coding Information for the Software: 

Serial Port which the Arduino is attached COM4
Value at which the gate is vertical (10-170) 70
The first LED to turn on (left or right) Left

 

 

Unobstructed Sensor values

 

Forward

 

83

 

83

Is there a pattern to these values? Briefly describe the pattern The first reading gives forward, so it should be reading fo the approach of the train in forward motion. The is a static output when the sensor has nothing to read.
Obstructed Sensor value  

411

 

 

410

 

 

82

 

Is there a pattern to these values? Briefly describe the pattern The values are only closely related if the obstructinon is removed then re-implemented. Otherwise the values show a marked difference. The readings seem to hover around 410 and 83.

 

Are the values always consistent? Why might this be important when it comes to writing a program? The values are prone to minor fluctuations. Sensors that read off values, used in loops, could miss or over-record the times a condition is met, producing erronous data. The fluctuations need to be corrected for in the conditional statements.


Table representing the relationship between motorSpeed, Train Speed and Time to complete 1/2 circuit:

motorSpeed (0-255) Time for 1/2 circuit (sec) Train Speed (mph)
255 3.3441 0.6272
230 3.6681 0.5718
200 4.5595 0.46
190 5.049 0.4154
170 6.3974 0.3279