How to connect sensors - GigaFlopsis/rc_car_ros GitHub Wiki
Сonnection RC motor and servo to RPI
As you can see the Raspberry PI and the servo is connected to different power converters. Embedded in ESC of BEC provides an average 2A, that is sufficient to power only the Servo. An additional source > 3A 5V is required to power the RPi.
MPU6050 to RPI
Enable i2c interface frome RPi 3 (if not done previously)
First we enable I2C.
sudo raspi-config
Here we find the menu for activating services. Under “8. Advanced Options” there is the entry “A7 I2C”, which we activate (This can differ in other Raspbian versions). For older Raspbian versions, the entries in the /etc/modprobe.d/raspi-blacklist.conf file must be excerpted (with #).
We then edit the modules file:
sudo nano /etc/modules
If the following lines are not already included, add them and restart the Pi (sudo reboot):
Shell:
i2c-bcm2708
i2c-dev
Now we can quickly install the necessary tools:
sudo apt-get install i2c-tools python-smbus
Сonnection Rplidar A2 to Rpi
Just connect via usb -> uart converter to a free usb port.
For further configuration, use this instruction