Skip to content

0xhyperdan/raspberry-pi-car

Repository files navigation

raspberry-pi-car

🚗 树莓派小车(use WiringPi library)

Circuit diagram

circuit diagram

  • NOTE: raspberry pi GND must be connect L298N GND interface.

Build keyboard control

  1. git clone this repo
  2. cd project dir raspberry-pi-car/respberry-pi-car/car/*
  3. run commond gcc -o car car.c -lwiringPi -lpthread
  4. run commond sudo ./car
  5. keyboard input 'w' = forward、's' = back 、'a' = left 、 'd' = right 、 'space' or 'other' = stop , ANSI code control car.
  • NOTE: remember comment unselect "main" method.

Build android client control with socket

  1. git clone this repo
  2. cd project dir raspberry-pi-car/raspberry-pi-car/server/*
  3. run commond gcc -o server server.c ../car/car.c -lwiringPi -lpthread
  4. run commond sudo ./server
  5. socket send commond to server 'w' = forward、's' = back 、'a' = left 、 'd' = right 、 'space' or 'other' = stop , ANSI code control car.
  • NOTE: your raspberry pi has the wiringPi library installed.

EOF

Releases

No releases published

Packages

No packages published

Languages