The BrickSorter process.
The purpose of the BrickSorter process is to sort bricks by color and size.
At each sorting area, the bricks are sorted into eight containers.
The four containers to the left, are used for size 2 x 2 bricks.
From the left the colors are red, yellow, green, and blue.
The four containers to the right are used for size 2 x 4 bricks in the same color order.
The process consists of four functions.
Function one: Reset.
The BrickSorter robot is turned on every morning on weekdays.
When turned on, it resets its starting position.
It does this by first moving a fixed distance to the left,
and then to the right.
Infrared sensor A detects the Reflector
and then moves the robot a fixed distance to the starting position.
The Software (Application) defines the fixed distances.
Function two: Scan.
Large motor B loads a brick from the chute and detects the size.
Color sensor A in 'color mode' detects the color of the brick.
Function three: Move.
Control unit A uses Wi-Fi to request the central Database for the container width.
The Application calculates the degrees that Medium motor A must rotate
to move the robot to the container corresponding to the brick size and color.
Medium motor A powers the wheels, moving the robot to the container.
Function four: Eject.
Large motor A ejects the brick.
The robot is now ready to scan the next brick.
For every five bricks, the starting position is reset.