This repository contains the code and documentation for aligning a Robocon robot around a pole using a Lidar sensor, Raspberry Pi, and Arduino Mega. The alignment process involves obtaining raw data from the Lidar sensor, computing angle values on the Raspberry Pi, and serially transmitting them to the Arduino Mega, where the alignment algorithm is executed.
- Lidar Sensor
- Raspberry Pi
- Arduino Mega 2560
- Python (for Raspberry Pi code)
- Arduino IDE (for Arduino Mega code)
- Ubuntu 20.04 on Raspberry Pi
- Connect the Lidar sensor to the Raspberry Pi.
- Connect the Raspberry Pi to the Arduino Mega using UART.
- Upload the Arduino Mega code to the board.
- Run the Raspberry Pi code to start obtaining Lidar data and computing angle values.
/LIDAR_AL.py
: Contains the Python code for obtaining Lidar data and computing angle values./RPLidarReciving.ino
: Contains the Arduino code for executing the alignment algorithm.
- Run the Raspberry Pi code:
$ python3 LIDAR_AL.py
- On Arduino Mega upload RPLidarReciving.ino code .
- Connect Raspberry Pi USB port to Mega