x10.nwt (also needs x10.bit (for a bitmap graphic)) ---------------------------------------------------- 5/29/95 version 0.9 by William H. Ball (bball@mailstorm.dot.gov) Distributed under GNU CopyLeft. You may modify and distribute this code, but not claim it for your own. Newton owners with CP290 interfaces, Newt and a Newton are encouraged to improve, build, extract and distribute this app in .pkg format (I don't have NCK for the Mac or Windows). Building the App To build this app, you will need a MessagePad, Slurpee, Newt3.1, along with Newt's various packages: PlatFunc, NewtPack, CommCnst. Transfer x10.nwt to your Newton using Slurpee. Transfer x10.bit to your Newton using Slurpee. Run Newt. Hit the Expr button. Select BuildApp. Hit the Eval button. When the app builds, hit the Save button, and the X10 app will be installed. A lot cheaper than NTK, huh? Description ----------- This is a small, floating app for the Apple Newton. By connecting an X-10 CP290 interface to the Newton or your favorite home computer, you can directly control up to 256 X-10 devices, including devices responding to dim commands (light control modules). For technical information concerning the CP290, see the CP290 Programming Manual. Generally, the interface provides: a real-time clock, storage for events, storage for graphics data, and transmission of control signals through the electrical wiring of your home. The interface accepts eight types of instructions, has a 5-pin DIN RS232 interface, and 2k x 8 RAM. Caveats ------- This is my first attempt at translating an NTK project to Newt. Do not use this code as a good example of NewtonScript programming. There is currently one nasty bug: This is that X10 will crash your Newton if you hit the Send button without being connected to the CP290 interface (the serial handling routines are still a mystery to me). A good X10 app will read the acknowledge data from the interface following the sending of a command, store device icons and events, synch with your computer's clock, and offer graphical control of your devices. This version of the Newton X10 app simply sends commands to the interface. I believe there is a version of an X-10 controller with an IR interface (Radio Shack sells a universal remote with X-10 buttons), so it may be possible to convert this code for IR control through your Newton. Possible improvements would be: adding the ability to synch your Newton's clock with the CP290 or the CP290's clock with your Newton; ability to name or assign icons to devices; or code to view, change or enter device events. This would require serial reads and soup storage. Credits ------- Thanks to Howard Oakley, EHN & DIJ Oakley for the floating code, Matthew Dixon Cowles for serial port code, and of course, Steve Weyer, for Newt, an amazing feat of programming.