Page 150 - Hacking Roomba
P. 150

Making                                                          chapter



                   RoombaView







                              ith a complete Roomba API like RoombaComm, it’s now pos-
                              sible to build an application on your computer that is both a
                     Wcontrol panel for Roomba with many more features than the
                     standard remote and an instrument gauge for all the robot’s sensors. You’ve
                     already seen how to do parts of this, but this chapter shows how to tie
                     together everything you’ve learned so far into one application.  in this chapter

                     If you’ve used the code from the previous chapters, you can see how the    Code sketching
                     iterative process of write-compile-run is a bit clunky. It assumes a level of
                     comfort with the command line that many people don’t have. Java IDEs  with Processing
                     are an alternative, but they are so powerful they are often overkill for the
                     hobbyist. Those tools are made for professional software engineers and the    Package
                     staggering array of options and controls is daunting.               RoombaComm
                     When you do have a working Java program, creating an actual double-
                     clickable application can be problematic. Java programs run in a Java Virtual    Design a Roomba
                     Machine (VM) that must be installed on the computer on which you want  instrument panel
                     to run your program. If the computer doesn’t have a Java VM, or has the
                     wrong version, your program won’t work. If you’re on Windows, you had to    Build a complete
                     sit through the enormous download of the Java software development kit  cross-platform
                     (SDK) to compile the programs in the previous chapters.
                                                                                         application
                     Java made the promise of “write once, run anywhere.” Code written on one
                     type of computer could be run on any other. That sentiment is mostly true
                     except for the above rather large caveats. It turns out there is a solution to
                     many of these issues, and it came from an unlikely source.


                     About Processing


                     Processing (http://processing.org/) is a free open source program-
                     ming language and environment for people who want to write graphical
                     programs quickly. It was started by alums of the MIT Media Lab, and
                     includes contributions from hundreds of others. Processing arose out of
                     frustration with the state of software for generating and manipulating art.
                     The existing software was either costly and easy to use or free but difficult
                     to use.
   145   146   147   148   149   150   151   152   153   154   155