Page 60 - The Definitive Guide to Building Java Robots
P. 60

Preston_5564C02.fm  Page 41  Wednesday, September 14, 2005  5:42 AM



                                                                     CHAPTER 2  ■  SERIAL COMMUNICATION   41






























                        Figure 2-6. The Parallax BASIC Stamp



























                        Figure 2-7. The Parallax Javelin Stamp

                            When using either Stamp with your Java programs, I have found it tedious to perform the
                        same serial port and byte management for each class that will access the Stamp. To resolve this
                        problem, I’ll create a class that handles all communication with the controller. But like the serial
                        port, I may have different implementations for access, so first I want to create an interface for
                        all controllers, and then I want to write an implementation class specifically for my Stamp.
   55   56   57   58   59   60   61   62   63   64   65