Summary
In this activity, team C was introduced to the software they would use to code, and were given a general overlook of what they would need to do throughout the duration of this introductory portion of the project.
By completing this activity, the engineers learned how to upload code used to run their vehicle, and they learned of the coding language which would be used. Listed below is the code we had at the end of the activity.
Code Used:
Refer here for information on command functions.
Code Explanation
celerate(1,0,15,2.5); Accelerates motor 1 from start to 15% power in 2.5 seconds.
goFor(1); Run for 1 second.
brake(1); Brake motor 1.
celerate(2,0,27,4); Accelerates motor 2 from start to 27% power in 4 seconds.
goFor(2.7); Run for 2.7 seconds.
celerate(2,27,15,1); Decelerates motor 2 from 27% power to 15% in 1 second.
brake(2); Brake motor #2
reverse(2); Reverse motor #2
celerate(4,0,31,2); Accelerate all motors from start to 31% power for 2 seconds.
celerate(4,31,35,1); Accelerate all motors from 31% power to 35% in 1 second.
goFor(1); Run for 1 second.
brake(2); Brake motor #2
goFor(3); Run for 3 seconds.
brake(4); Brake all motors.
reverse(1); Reverse motor #1
celerate(1,0,19,2); Accelerate motor #1 from start to 19% power in 2 seconds.
celerate(2,0,35,2); Accelerate motor #2 from start to 35% power in 2 seconds.
motorSpeed(4,19); Run all motors at 19% power
goFor(2); Run for 2 seconds.
celerate(4,19,0,3); Decelerate all motors from 19% power to 0 in 3 seconds.
brake(4); Brake all motors for 4 seconds.
Takeaway
Team C engineers learned all they needed about the code and how the functions work. They realized how important coding is going to be in this project, and they are looking forward to working with it.