Robotics Coding

Job ID: 36084453

Budget: £20 – £250 GBP

The purpose of this program is to make your Swiftbot wander around and search for a light source.
This should make the Swiftbot, first, take an image of the surrounding. Convert the image into a 1 X 3 matrix.
The three columns will represent the direction in front of the Swiftbot as left, centre and right. The Swiftbot should move in the direction that has the highest average light intensity. E.g. if the average intensity in the left-side is higher, the robot should move to left. If the average intensity in the centre is higher, the robot should move straight ahead. If the average intensity in the right-side is higher, the robot should move to right.
When moving, first the Swiftbot should set the underlights (bottom LEDs) colour to red, and, then, start moving forward at a low speed for 0.5 seconds. Then, the robot should stop and take another image and decide which direction it should move.
If the Swiftbot has not encountered a light source for 5 seconds, it should stop for half a second and change direction 90 degrees to either left or right. Then, it should start searching again.
The program should stop when the user presses the 'X' button in Swiftbot.
Before the program terminates it should ask the user whether it should display the log of the execution. If the user responds 'Yes', the program should display the following information:
" The overall highest average intensity observed in each section (left, centre, right) for the whole
duration of the journey
• The number of times the Swiftbot detected light.
• Movements of the Swiftbot for the whole duration of the journey in the order they were completed (e.g. Straight ahead 15 cm, Left 20 cm, right 30 cm)
Updated August 2022
6 of 11
" Total distance travelled.
• The duration of the execution.
This program should be implemented using a command-line user interface (input and output printed in the command prompt).
This description includes the required, core functionalities of the program. However, marks will also be awarded for additional functionalities that you have come up with. The additional functionalities should be useful and ingenuous and showcase your software development skills. The additional functionalities should not replace or conflict with the required functionalities of the task.