Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things with Raspberry Pi 3

You're reading from   Internet of Things with Raspberry Pi 3 Leverage the power of Raspberry Pi 3 and JavaScript to build exciting IoT projects

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788627405
Length 248 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Maneesh Rao Maneesh Rao
Author Profile Icon Maneesh Rao
Maneesh Rao
Arrow right icon
View More author details
Toc

Executing the commands

Let's now start sending the commands from MQTT.fx client and see our car in motion.

To move forward, we publish the message forward on topic controlPi/cmd as shown in Figure 8.12.

Command:

Figure 8.12

On the Subscribe tab we will see the message move forward as acknowledgment sent back from the car as a confirmation that the car is moving forward now. Refer to the following screenshot:

Acknowledgment:

Figure 8.13

To move backward/reverse we publish command reverse; the car will start moving in a backward direction, the red LED will glow and on the Subscribe tab we will see the message move reverse.

Command:

Figure 8.14

Acknowledgment:

Figure 8.15

To make a right turn Publish message right; the car will make a right turn and the right side indicator will blink. On the Subscribe tab we will receive the message Turn Right.

Command:

Figure 8.16

Acknowledgment...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime