A four-wheel drive car based on Raspberry Pi board.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Install and run rpi-webrtc-streamer for camera streaming via WebRTC.
You can use deb packages from this repository.
sudo apt update
sudo apt full-upgrade
sudo dpkg -i rws_xxx_armhf.deb
sudo systemctl start rws
Clone this repo to your Raspberry Pi
git clone https://github.com/alsakhaev/raspberry-pi-car.git
cd raspberry-pi-car
Install all NPM dependencies
npm install
The pigpio C library and therefore the pigpio Node.js package requires root/sudo privileges to access hardware peripherals. You can find more information about it at the page of pigpio library.
Build and run production bundle
sudo npm run start:prod
Or build and run development bundle in watching mode
sudo npm run start
For external remote control via Internet, probably you will need to configure port forwarding in your router. The following table describes ports using and its purposes.
Port | Description |
---|---|
8080 | Web client |
8081 | Node.js based API |
8888 | WebRTC Streaming Direct Port of RWS |
8889 | WebSocket signaling server of RWS |
packages/client
- React.js based web clientpackages/server
- Node.js based WebSocket API for car control
- Raspberry Pi 3B+
- Raspberry Pi Camera Module v2
- L298N Dual H-bridge Motor Driver Board
- 4WD Car Platform with 4 Gearmotors and Wheels
- Ultrasonic Distance Sensor HC-SR04
- 150Ω and 300Ω resistors for voltage divider
- Xiamoi Mi Power Bank 2S 10000 mAh (5V/2.4A each USB port)
This Fritzing project is available in the documentation folder: docs/fritzing.fzz
- Alexander Sakhaev
This project is licensed under the MIT License - see the LICENSE file for details