Skip to Content
Hands-On Robotics Programming with C++
book

Hands-On Robotics Programming with C++

by Dinesh Tavasalkar
March 2019
Intermediate to advanced
312 pages
7h 37m
English
Packt Publishing
Content preview from Hands-On Robotics Programming with C++

Wiring connections

The ultrasonic sensor's trigger pin is connected to wiringPi pin number 12, while the echo pin is connected to wiringPi pin number 13 via the voltage divider circuit. The VCC pin of the ultrasonic sensor is connected to physical pin 2 (5V) of RPi, and the ground pin of the ultrasonic sensor is connected to physical pin 6 of RPi. The remaining connections are as follows:

  • WiringPi pin 0 is connected to the IN1 pin of the L298N motor driver.
  • WiringPi pin 2 is connected to the IN2 pin of the L298N motor driver.
  • WiringPi pin 3 is connected to the IN3 pin of the L298N motor driver.
  • WiringPi pin 4 is connected to the IN4 pin of the L298N motor driver.
  • The motor driver's ground pin is connected to the physical pin 3 of RPi.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Robotics Programming

Learn Robotics Programming

Danny Staple
C++ Reactive Programming

C++ Reactive Programming

Praseed Pai, Peter Abraham

Publisher Resources

ISBN: 9781789139006Supplemental Content