0% found this document useful (0 votes)
42 views

Raspberry Pi Scratch Car Wiring and Program

The document outlines the wiring connections for a Raspberry Pi robot car using an L298N motor controller. It shows how to connect the Raspberry Pi GPIO pins to the motor controller as well as how to power the system using a USB phone charger. It also provides diagrams for controlling the motors and an ultrasonic sensor using the Scratch programming environment.

Uploaded by

Tariq Angel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Raspberry Pi Scratch Car Wiring and Program

The document outlines the wiring connections for a Raspberry Pi robot car using an L298N motor controller. It shows how to connect the Raspberry Pi GPIO pins to the motor controller as well as how to power the system using a USB phone charger. It also provides diagrams for controlling the motors and an ultrasonic sensor using the Scratch programming environment.

Uploaded by

Tariq Angel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Raspberry Pi Robot Car Wiring Connections

Pin15 Pin12
L298N

Pin13 Pin11
L298N Motor
Controller

+12v Gr +5 v
1 2 3 4

GPIO 15
GPIO 13
GPIO 11
GPIO 12

2 4 6 8 10 12 14 16 18 20 22 24

1 3 5 7 9 11 13 15 17 19 21 23

Raspberry Pi

Pi’s Micro USB Power Connection


USB Portable
mobile phone
charger

A. Davis issue 1.0 05.04.2015


Front

Raspberry Pi
23 21 19 17 15 13 11 9 7 5 3 1
Pin 15 Pin 12
left forward Right forward
24 22 20 18 16 14 12 10 8 6 4 2

L298N

L298N Motor
Controller

+12v Gr +5 v 1 2 3 4

Pin 13 Pin 11
left reverse Right reverse

A. Davis issue 1.0 05.04.2015


Using Scratch to control the motors

Reverse Forward

A. Davis issue 1.0 05.04.2015


Using Scratch to control an Ultrasonic Sensor

+5V Grn
1k

22k
22k

A. Davis issue 1.0 05.04.2015


This code make
the car move
back if distance
is less that 10cm

You might also like