|
Explore TEAMS!
|
Student /
SonLab4WimpModeResults: Wimp Mode wimps away from potential dangers when its bumpers or cliff sensors are set off. The wimp program I wrote for the Create does generally recreate the Wimp Mode. My flowchart for it does logically capture the actual Wimp Mode’s actions, however, due to technical difficulties within the Create (like inaccuracy of the angle or distance measurements without delays), my own wimp program was not able to completely or accurately imitate the Wimp Mode.
Learned: From doing this lab, I learned about the finer details of C-programming hands-on. Through trial-and-error as well as from getting extra help at the afterschool help sessions, I learned that while loops can have as many conditions as you want. Should the statement be untrue, the Create is kicked out of the loop and moves down to the next command. Having to recreate the Wimp Mode, I’ve learned how to better structure my codes and how to think more critically about the logic by which the Create functions. Doing this lab has also made me realize the importance of flowcharts. I’ve also learned how to translate my flowchart into code.
Debugging: I used the LED’s, attachable display, and beeps to help me debug my wimp program. I inserted codes to make certain LED’s light up and in different combinations to indicate which part of the code (loops) I was in. For example, when the Create wouldn’t drive forward when I kicked it from behind, I checked to see if it was even making it into that “kick” loop or “main drive” loop by having the Play LED light up when it’s waiting to be kicked; and by having the all the LED’s on when it was driving forward in that “main” loop. Since the Play LED didn’t light up, I checked that while loop and figured out that I had worded the conditions wrong. I used the attachable display to help make the Create stop after 600 mm. I had the beeps as indicators for the “while unsafe” loop. I had the Create beep as it waited to be put back into safe mode if it was made unsafe, and also as it waited for the play button to be pressed.
|