Page 248 - Hacking Roomba
P. 248

Chapter 11 — Connecting Roomba to the Internet                 229



                             Both the SitePlayer and the XPort are good embedded device servers. For Roomba hacking,
                             the SitePlayer is a bit more appropriate, but the XPort is more useful if you’re trying to add
                             network capability to devices with less available space. For example, if you wanted to put your
                             coffee maker or alarm clock on the Internet, the extra space savings the XPort affords could
                             be critical.
                             Modifying RoombaComm to use a networked version of Roomba was easy. And while modify-
                             ing your existing programs and sketches to use the new, networked RoombaComm is a little
                             clunky, no doubt you have some ideas on how to make it work. Java has some patterns for deal-
                             ing with this situation, and they’re easy to add. Both the SitePlayer and the XPort support a
                             UDP mode instead of the Telnet-like TCP. UDP is connectionless, making you deal with
                             packets of data instead of streams. For most cases, TCP is preferred, but you may like dealing
                             with Roomba (or other networked objects you create) in a packetized fashion.
   243   244   245   246   247   248   249   250   251   252   253