Updated Read-me

This commit is contained in:
Tanja Sukal 2024-08-27 08:44:27 +00:00
parent ca985e2803
commit ce4944cd7f

View File

@ -4,7 +4,7 @@ The following document describes a program written in Python for the Lego Mindst
The purpose of the program is to let a robot sort cubes based on their color.
## Used Hardware
<img align="right" src="/Pictures/Proj2_RobotStructure.png" width="150">
<img align="right" src="Pictures/Proj2_RobotStructure.png" width="200">
The program was written for the LEGO EV3 Brick. It is the base of every Mindstorm EV3 robot. Additionally, for identification of an object / color, a camera from an external company is used.
The built / used robot has two motors, one on each side, with two wheels each connected via a caterpillar track.
But the program should work with all robots that have one driven wheel per side.
@ -34,11 +34,13 @@ To track the distance between the robot and the cube, a LEGO Ultrasonic Sensor i
* **Color Sensor**: Connected to input-port **3**
* **Gyro Sensor**: Connected to input-port **4**
#### Objects to sort
#### Objects to sort <img align="right" src="Pictures/Proj2_ColoredCubes.png" width="200">
The sorted objects are simple cubes made of paper. You can find the tutorial for folding the cube on [YouTube](https://youtu.be/VjooTcZRwTE?si=HaiStBDw1cQu3K7o). To ensure the ultrasonic sensor recognizes the cube, it is 5.5 cm high and long. The two colors should be distinct from each other.
<img align="right" src="/Pictures/Proj2_ColoredCubes.png" width="150">
## Program
<img align="right" src="Pictures/Proj2_Flowchart.png" width="500">
The purpose of the program is to sort different objects. In detail, this means that the robot should push all green cubes out of the sorting area and leave all orange cubes inside.
The main part of the program is the class "Object_Sorter". Due to the fact that the robot gets a lot of inputs and does not need to check everything at the same time, the class contains five different state methods. The robot will switch automatically between the states when certain events happen. You can identify the current state by looking at the LEDs on the EV3-brick.