Page 240 - Hacking Roomba
P. 240

Chapter 11 — Connecting Roomba to the Internet                 221



                             To power the SitePlayer Telnet box you can either plug it in normally with its wall wart or
                             fashion a power plug from an old DC adapter. If you recall, the SitePlayer Telnet box uses a
                             standard 7805 voltage regulator, so it can handle the 16 VDC from the Roomba. You could
                             fashion a good reusable connector if you plan on using the SitePlayer Telnet System box in this
                             configuration, or you could do what was in Figure 11-12 and create a simple power tap. If
                             you’ve built your own SitePlayer Telnet Roomba adapter circuit, as in Figure 11-13, you don’t
                             have to worry about power problems because the circuit has its own voltage regulator and taps
                             the Roomba battery in the standard way via the Mini-DIN 8-pin plug.


































                             FIGURE 11-13: SitePlayer Telnet Roomba adapter hooked up to Roomba


                             If you know how to write network programs, you can immediately start sending ROI com-
                             mands to Roomba by connecting to the telnet port (port 23) on the SitePlayer Telnet. As a
                             quick experiment, try sending the byte sequence 0x80,0x82,0x86 (with 100msec pauses in
                             between), and Roomba should start doing a spot clean. For example, if you have Perl and net-
                             cat (nc) on your system, you could do this:
                             % perl -e ‘@b=(0x80,0x82,0x86); for(@b){ printf(“%c”,$b);sleep(1);
                             }’ \
                                 | nc 192.168.0.147 23

                             The little Perl program outputs the bytes with a one-second delay between them, and netcat
                             connects the Perl program to your Roomba’s SPT.
   235   236   237   238   239   240   241   242   243   244   245