|
You will have to build an executable that will take the following steps:
It would be useful if you had that program setuid, so that everybody can drink coffee! You BOFH!
Just read kernel hacker's guide, to implement a device driver; you might also do it in user space. Please compile it as a module, so that we won't need a kernel compile in every update. Then write:
echo cappuccino >/dev/coffee
And you will have a hot cup of coffee in minutes! Remember to give the right permissions to /dev/coffee, depending on whether you want only root making coffee or not.
The advantage of this method is that it supports feedback from the coffee-machine by using the ACK of parallel port and such, so that smart coffee-machines can produce an interrupt when ready.
Do it yourself, after reading the excellent book of Alessandro Rubini and Jonathan Corbet Linux Device Drivers and studying the Cross Reference Linux source code repository.
If you have implemented the controlling program in C (see above), you just have to write a CGI script to turn ON and OFF the coffee-machine or pass along more complex instructions. You should write some nice webpages, explaining how to make coffee, and put them on an apache web server...
...LAMP technology (Linux, Apache, MySQL, [Perl|Python|PHP]), will help you to build a perfect user-customizable coffee system!
At some time in the future when the applications get rather complex, you might want to extend on the basis of Flow-Based Programming: http://www.jpaulmorrison.com/fbp/. What a great match for a great Coffee Machine!
Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:13