|
Explore TEAMS!
|
Student /
Lab4RichardsWimpModeSummary and ProblemsRecreating the wimp mode is a lot harder than you would first think. This is because there are so many small details that are essential to recreate the mode, without these details it wouldn’t work. When receiving the assignment, I tried starting with the code at first, and ended up mixing everything up, which made my code useless. I had to start all over, and this time I made a flow chart first. Having the flow chart makes everything so much easier because you have everything in front of you; you just have to convert it into your code. It’s much more difficult without the flow chart because the wimp mode consists of many loops and if statements, so it’s really hard to have all of those in your head at once. When it comes to the coding, I learned that you can have a lot of different combinations, such as while loops within if statements and vice-versa. Also, I learned that if you have while loops that overlap each other in your flow chart, your program will most likely get messed up and end up getting stuck in one loop. That’s why you should try to avoid overlapping loops in your flowchart. The importance of the flow chart is probably the most significant thing that I learned from this lab. Although flowcharts might not have everything at the beginning, they can get you started and it’s a lot easier to add on more parts to the flowchart from there. One part I had trouble with in my program was getting the Cr8 to beep only once while out of safe mode. Before, the Cr8 would keep on beeping, which was really annoying. I fixed this problem by taking the beep out of my safe function, and adding it right before the program entered the unsafe while loop. I also had problems with stopping at first, but then I realized that my program needed a delay so the over current of the wheels wouldn’t push the Cr8 back into the starting loop. Although most of the problems I had were small details, my program couldn’t work without them being correct. Lessons I learned:
|