Skip to: Site menu | Main content

Making Things Move: Finding Inappropriate Uses For Scripting Languages

Fri, Jul 28th 2006: Oregon, USA: OSCON

Most software developers work with on-screen systems where the only external interaction they have is through traditional devices like the keyboard and screen. However, it's easier than you may think to connect real-world devices to your computer for control and data collection, and scripting languages like PHP, Perl and Python are ideal for rapid development of control or data logging software. The presentation includes a demonstration of connecting to the parallel port using a trivial C program that provides a simple interface to be called by a script, making it possible to access the port even from languages without native parallel port support. Use of the parallel port to control devices and collect data is demonstrated, including a letterbox sensor to detect when (physical) mail has been delivered, control of home lighting, and control of other devices such as fans and electric curtains using a web interface driven by PHP. Other interface options including USB, PS/2, and regular serial ports will then be discussed, and other devices including a home-made RFID reader and electric door strike are demonstrated. Surgically implantable RFID tags are be demonstrated. Finally integration with the GNOKII SMS tools is demonstrated, showing how scripting languages can provide the glue that allows things such as:
- Delivery of physical mail to a letterbox generating an SMS.
- Sending an SMS to unlock a door.
- Unlocking a door, opening curtains and turning on lights when an RFID token is read.