Raspi Robot is a simple python program for raspberry 3B, include Motor Shield(L298N), Ultrasonic Sensor(HC-SR04) component.
python raspi_robot/robot.py
Install
make install
Run
raspi-robot
Need to change L298N/HC-SR04's actual GPIO port in driver.py
、decelerator.py
、ultrasonic.py
.
L298N | GPIO |
---|---|
IN1 | GPIO 05 |
IN2 | GPIO 06 |
IN3 | GPIO 13 |
IN4 | GPIO 26 |
ENA | GPIO 18 |
ENB | GPIO 19 |
L298N | GPIO |
---|---|
VCC | GPIO 5V |
TRIG | GPIO 23 |
ECHO | GPIO 24 |
GND | GPIO GND |