This project is based on the following hardware robot: Elegoo robot car kit (2.0)(review)
Video on YouTube (from review)
This video shows the basic default behavior of this bot. It drives, looks around and avoids obstacles.
As standard, the bot cannot look around and change behavoir at the same time due to synchronous processing. The ultrasonic sensor is not electronically connected to the interrupt pins on the arduino, making it impossible (without altering the bot) to implement async behaviour using these interrupts. Therefore, we will use a software version.
This software version and comparable simple behaviour is implemented in the "standalone" folder
Behaviour:
- Asynchronously readout ultrasonic sensor measurements
- Simply act on measurements and control motors
- Drive straight untill obstacle is detected. Simple "calculation" to find best way out. (Possibly back away and drive an available direction. Or simply adjust forward course)
The bot's Arduino will perform rudimentary communication with the Raspberry Pi. It can be found in the "arduino_with_rpi" folder.
- Arduino USB connected to RPi USB.
- Serial communication
- Sensor measurements from Arduino -> RPi
- Control commands from RPi -> Arduino (Aim sensor, retrieve sensor value, drive speed, drive direction)