Skip to content

Lmanangka/toy-car-with-camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toy Car with Camera

Toy car with Picamera and Raspberry pi using python

Image of Raspberry Pi car

Image of Raspberry Pi car driver motor

Requirements

  • Raspberry Pi
  • Picamera
  • Motor Driver
  • DC Motor(L298 H-Bridge)
  • Arduino Nano(Optional)
  • Car Body
  • Battery and Power bank for driver motor and Raspberry Pi
  • Cable Jumper
  • Laptop or PC

Install Pygame

python 3.7

python3 -m pip install -U pygame --user

python 3.8

python3 -m pip install -U pygame==2.0.0.dev6 --user

Check this Pygame installation if having troubles

Block Diagram with Arduino

Image of block diagram with Arduino

Jumper from Arduino Nano to Driver Motor

Use PWM pin in Arduino to control motors speed here is the links for Arduino PWM pin and Arduino PWM tutorial

Arduino Nano ------> Driver Motor

  • D11 -------------> IN1
  • D10 -------------> IN2
  • D9 --------------> IN3
  • D6 --------------> IN4
  • GND -------------> GND
  • 5V --------------> 5V <<-------- to power Arduino nano with battery

Block Diagram without Arduino

Image of block diagram without Arduino

Jumper from Raspberry Pi GPIO to Driver Motor

here is the link for Raspberry Pi GPIO or type this in Raspberry Pi terminal

pinout

Rpi GPIO ------------> Driver Motor

  • GPI0 10--------------> IN1
  • GPIO 24--------------> IN2
  • GPIO 27--------------> IN3
  • GPIO 18--------------> IN4
  • GND -----------------> GND

How To Use It

  1. Run this code from laptop/PC
play.py
  1. Run this code if using Arduino
car.py

or run this code without Arduino

car-without-arduino.py
  1. From Raspberry Pi terminal connect to Laptop/PC using IP address

Author:

Acknowledgements:

About

Toy car using raspberry and arduino with Raspi-cam

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published