PHYSICS 420 PRESENTATION
Programming
Programming
The BX-35 microcontroller was programmed in a higher-level language BasicX. There is extensive documentation
provided by NetMedia for programming, which can be found here.
The outline for the program follows pseudo-code similar to this:
Align ultrasonic servo
Calibrate ultrasonic sensor
Do
Begin driving the robot forward
Execute ultrasonic servo function
Execute magnetic detection function
Read magnetic detection voltage value
If magnetic detection value is greater than or equal to threshold value
Stop robot
Blink LED 10 times /Can be replaced with marking system, coordinates, flags, markers/
Execute ultrasonic detection function
Read ultrasonic detection voltage value
If ultrasonic detection value is greater than or equal to threshold value
Stop robot
Rotate steering servo 45degrees
Drive robot forward for 20 seconds /In order to execute 180degree turn/
Drive robot forward
Turn counter gains 1
Loop
The full program for the robot can be viewed here.