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

VoiceBot server program

In this VoiceBot server program, we will first use a socket program to establish a socket connection between the devices. Next, we will receive the incoming data, which is sent from the Android smartphone. Finally, we will move the robot based on the data that is sent. The VoiceBot.c program can be downloaded from the Chapter09 folder of the GitHub repository. Follow these steps:

  1. First, all the necessary header files are declared as follows:
#include <stdio.h>#include <unistd.h>#include <sys/socket.h>               //Socket header file#include <bluetooth/bluetooth.h>      //Bluetooth header file#include <bluetooth/rfcomm.h>         //Radio frequency communication header file#include <wiringPi.h>
  1. Next, inside the main() function, the wiringPi ...
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