# Finishing My "Summer" Project

**What's up?**

(This paragraph is about how my day went, so you can ignore it if you want to)
Today I finished a classic book called "The Lord of the Flies." Though I had some trouble understanding the context(only sometimes), I still really enjoyed it, and I recommend it!

Anyways, today I finished programming my summer project. If you don't know what my summer project is, it is basically my robot reading a color using its color sensor and depending on the color, it will move(not just move, but move in all sort of ways). For example, if it senses the color red, it will move recutalgular(I hope that makes sense).

My summer project in total took some time. I first needed to make the board(the image above), which did not take a lot of time and was probably the easiest part. Then, I needed to know the number of the colors. What I mean is, my color sensor reads colors it is seeing by numbers. Here is an image:

![IMG_3400.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1661001216632/zInQgE3rC.jpg align="left")

There are four rows that is going vertically. Why there are many numbers going up to down is because I made a program that reads the color every 0.1 seconds, so the page fills up with numbers quickly. I took the image when the robot was reading the color black, so the number of the color black is around 960. After I wrote down the numbers for the colors black, green and red, I needed to program the robot to react depending on the number of the color the color sensor is reading. For example if the color sensor is reading the numbers 960, it means the color it is seeing is black. Finally, I needed to write programs for the robot to move(spinning, triangle and square) when it reads a color. The shapes(triangle and square) were especially difficult because the more sides the shape had, the longer the program was.
After many trial and error and many hours spent, I was able to finish it. My program had no errors at the end, and my robot moved as I imagine it to be.

These are videos of my robot reacting to the colors. I used a color tape and put it under the robot(which is where one of the color sensors are located) for it to react. Why I am using a color tape and not using the board like the image on the very top is because I accidentally left it at my robot club's office, and I was not bothered to make another one.

Black(triangle): https://www.youtube.com/shorts/82sZXIi1s90

Green(spin): https://www.youtube.com/shorts/XfEeFhaezhQ

Red(square): https://www.youtube.com/shorts/-izh1pT5pkw

The movements arent perfect, and the "360" degree turn wasnt even 360; it was almost 720 degrees. However, I think I still did not bad. Yes there are room for improvements, but at the end of the day, it is just a summer project. I will leave it as it is, and move on improving my robot. Some day I might go back and fix some parts, or maybe not.

Well, I guess I will be concluding my small summer project.

Thank you for reading,





