Well.. Let us tell you:
It all started around December 1996 in the cantina at DIKU where we (Martin (left) and Jesper), were chatting idly.. err - eagerly working on assignments - when Jesper pointed at the Coke machine and suggested connecting it to the Internet. Martin revealed that he had been fiddling with the idea for quite some time - in fact, it was not exactly a new idea at DIKU, and so he immediately agreed.
After a couple of days of thinking about practical details, looking into the innards of the Coke machine and discussing various ways of building an interface (whilst drinking the contents of the machine, of course :-), the following solution was suggested:
In order to avoid modifying the machine too much, (it's not actually our machine - we lease it) the interface was made to probe the Light Emitting Diodes on the front of the machine. There are seven of these leds. The first diode lights if it is necessary to use correct change, the other six refer to the six columns containing cokes. These light for three seconds whenever a Coke is sold, are off if the column contains cokes, and light constantly if the column is empty. This way we thought it would not be too difficult to write a small program to watch the behavior of the leds, but we'll get back to that later on.
We discussed what the easiest way of transmitting the led status to the coke machine would be. After some thinking, we came up with the idea of using the parallel port on a PC to monitor the leds. Now we needed an electronic circuit that could determine wether each diode was lit or not.
We found out that Morten Jøhnk was quite an electronics expert, and he agreed to build and design the electronics for us - we know absolutely nothing about that. For example, Morten helpfully determinded that the "leds" were not, in fact, leds, since they run on 110 volts. Electronics experts do this by getting an electric shock ... :)
It turned out that we could assemble a PC 486DX 33Mhz with 8Mb RAM, 256Kb cache and 210Mb hard disk for free! We just asked around and got a couple of pieces people had laying around unused.
Since we wanted to write xcoke, and since most machines at DIKU have no direct access to the outside world (net access passes through a proxy-server), it seemed a good idea that xcoke should obtain information about the current state of the coke machine via a HTTP-request. Thus we needed to have a web-server running while polling the parallel-port, generating status-files, etc - Linux was *the* operating system to choose. It's free, and we would easily be able to generate a html and finger version of the current status of the coke machine.
We installed Linux on our coke-server, and started reading about how the parallel port is accessed. We built a very primitive connection to the parallel port, connecting +5V from the PC's power supply to a 4.7K-ohm resistor to an input pin on the port. After fiddling around quite a bit, we were able to read data from the port!
While this was going on, we were talking to people at DIKU: we needed a connection to the 'net, and an ip-number. The computer department readily agreed to help us (it was about time that the coke machine was connected to the 'net, they said). For security reasons, we had to connect the coke-server to DIKUs net on the outside of the firewall. It turned out that the distributed operating systems (distos) group have their own, experimental net outside DIKUs firewall, so it seemed a good idea to connect to their net. Luckily, the distos-net is physically close to where we would place our server - we only had to drill two holes to connect our server to the distos net (and thread the net cable through various ventilation ducts, cable trays, etc.). Now we just needed permission to connect to the distos net, and an ip-number on that net. The guy in charge of the net (Eric Jul) is luckily a Coca-Cola-addict, so he readily consented, and provided us with our ip number and name: amgios12.diku.dk.
We met a few times during January to work on the listener, and to configure our Linux server. We got a lot of Linux-help from Rene Bækgaard, our local Linux-expert. Quite a few hours (well - two days, actually :) were spent in the computer workshop at DIKU, trying to produce the circuit boards for Morten. We'd never tried this before, and it is a complicated process involving sodium hydroxide, iron chloride and patience. We succeeded at last, and after several attempts we even managed to buy the correct components!
Finally, on Tuesday, January 28 1997 at 17:15, everything was connected and on-line. After a few minor adjustments to the listener, the basics were running smoothly. Now all that remained was writing nice html pages, writing this text, taking pictures, scanning them, writing software to produce statistics, writing various scripts for server maintainance, adding functionality to xcoke, ... :)
And that's about that!