Category: School-related


Post 6, week something

Over the past few weeks, I have been working to figure out the logic and structure of my car’s code. After all, I have to do some planning. This involves a lot of counting and it is like probability, where you have to consider every possibility. I have 4 sensors that I am working with, and I have to figure out how their input will effect my motors in different situations, like when the car is just put on the track. Now, I have basically finished all the logic, but have yet to actually write the code.

These are some of my logic diagrams.i tried doing a mind map, but I think it is better if I do this first and then maybe see if I need a mind map
Another thing that I have to figure out is how I can write my code. Obviously, I can do like fifty “if…” statements for every possible input, but that is very tiresome, and it does not look professional. My dad suggested a statement, but he doesn’t know python, and that statement is only for C. Other statements that people suggested to me, I don’t understand at all, so right now I am reading several books on python and doing an online course hosted by U of Waterloo.
It’s called Python from Scratch

I haven’t started writing the code yet, but I know I should really hurry up, because if my code don’t work, oh well, I won’t have anything to present on in-depth night! So I should probably allow some time for me to debug and add for functions that I would love to have, if I have time. These are things like a new mode that uses 3 ultrasonic sensors, online viewing and control from the car’s Raspi camera, etc.