Skip to Content
Learn Robotics Programming
book

Learn Robotics Programming

by Danny Staple
November 2018
Beginner
472 pages
13h 5m
English
Packt Publishing
Content preview from Learn Robotics Programming

Enhancing the image app core

To build this, we will start by extending and reusing the image app core we used in the previous chapters. We'll add a few features:

  • Serving static files: Our JavaScript and CSS files will be served here, along with a local copy of the jQuery library. Flask does this automatically, but we need cache headers so it stays fresh.
  • Extending control to allow a whole path: Currently it only allows a single word, we need a bit more than that now. This way we can tell /control/set_left/100 to put set_left/100 on the control message queue.
  • Add an exit handler that redirects to the menu server and puts an exit message on the control queue.

First, we will need a few more helpers imported from Flask. We are editing the ...

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 - Second Edition

Learn Robotics Programming - Second Edition

Danny Staple

Publisher Resources

ISBN: 9781789340747Supplemental Content