IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Coffee Making

Search Howtos :Match :
Next Previous Contents

4. Software

4.1 Programming

You will have to build an executable that will take the following steps:

  • Get permission to use I/O address space, by calling kernel, with the call ioperm: eg ioperm( BASE, range ,1);
  • Perform an out request instruction, to set the 0-5V voltage to the parallel port, eg outb( 1, BASE );
  • Wait enough time so the coffee is made. It would be nice if that time is read by looking at the command line.
  • Then it will turn off the coffee-machine: outb( 0 , BASE );
  • Before ending it should give back the parallel port with an ioperm( BASE, range, 0);
Change BASE = 0x3bc for /dev/lp0, 0x378 for /dev/lp1, and 0x278 for /dev/lp2; range=8.

It would be useful if you had that program setuid, so that everybody can drink coffee! You BOFH!

4.2 Device driver

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.

4.3 Connecting with the Internet

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!


Next Previous Contents
Search Howtos :Match :
Opera 10.10
Opera for Linux
ImageMagick 6.5.7.10
ImageMagick image processing studio
DeleGate 9.9.6-pre6
Proxy server which runs on multiple platforms
Inkscape 0.47
Vector graphic editor for SVG
Nano 2.1.99pre2
Emulate Pico while also offering a few enhancements.
My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
Rhythmbox 0.12.6
Integrated music management application
Tellico 2.1.1
Collection manager for books, music, videos, and bibliographies
Totem 2.28.4
Movie player for Gnome
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info