Preparing the Raspberry Pi for remote driving—get the basic driving system going
Our Raspberry Pi has already been able to run web services, using Flask to create a menu server and video servers. We can use image and control queues to make a behavior interact with a web server. We are going to reuse these capabilities. In the phone app, the slider controls will need to be smart. The next diagram shows the parts of our manual drive system:
The dashed boxes in Figure 17.8 show where the code is running, with the top dashed box being code running on the phone, and the lower box being code running on the Raspberry Pi in the robot. Inside the dashed boxes, the boxes with solid outlines are blocks of code or systems our code will need. At the bottom layer of Figure 17.8, the Robot box accepts the stop motors and set motor speed calls. These are from the Behavior box based on timeouts or the...