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++

Controlling a rover using a laptop keyboard

After controlling the LEDs and the buzzer, let's write a program for controlling our rover (the robot) from our laptop:

I have kept the wiring connections the same as they were in Chapter 3, Programming the Robot:

  • The wiringPi pin numbers 0 and 2 are connected to the IN1 and IN2 pins
  • The wiringPi pin numbers 3 and 4 are connected to the IN3 and IN4 pins
  • The left motor pins are connected to the OUT1 and OUT2 pins of the motor driver
  • The right motor pins are connected to the OUT3 and OUT4 pins of the motor driver
  • Pin 6 of the Raspberry Pi is connected to the ground socket of the motor driver
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