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 theSubscribe
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 commandreverse
; the car will start moving in a backward direction, the red LED will glow and on theSubscribe
tab we will see the message move reverse.
Command:

Figure 8.14
Acknowledgment:

Figure 8.15
To make a right turnPublish
message right
; the car will make a right turn and the right side indicator will blink. On theSubscribe
tab we will receive the message Turn Right
.
Command:

Figure 8.16
Acknowledgment:

Figure 8.17
To make a left turnPublish
the message left
; the car will make a the left turn and left side indicator will blink. On theSubscribe...