As part of the computing team I learned many skills involving python and about using virtual environments. I also learned about how to use different sensors and apply code to a physical model in real life.
While coding this project I utilized and learned many different coding techniques and structures.
In the code I used many different techniques such as looping, nested structures, if + elif statements, logical operators such as and + or. We used several functions for different processes in order to make an efficient main function.
Figure 3. Example of a nested while loop used in our code
In this project we used Q-labs virtual environment in order to simulate our code. I learned several things about the environment primarily about using sensors. One interesting thing about the virtual environment is that the sensors detect in a sphere around it, rather than in real life where it just detects in front of it.
In this project we learned about many different kinds of sensors, such as IR sensors, photoelectric sensors, color sensors, ultrasonic sensors, etc. However, in our code we primarily only used two kinds. In our main code we used the color sensor which detects color and returns RGB values based on what reflects back to it. This was used to distinguish between bins and ensure containers are deposited at the right spot. When we went for our bonus mark we tried the color sensor however, it was very inconsistent in real life resulting in us switching to the ultrasonic sensor. This was much more accurate in real life and helped us achieve our bonus mark.