Senna Labs
Let's talk

The Carnegie Mellon Coke machine that went online

  • Internet of things
  • Tech history
Published
15 November, 2026
Stage
Automate
Type
Article
Time to read
6 min read

Key points

  • Carnegie Mellon's own Coke machine page says the first network interface was built in 1982 by Mike Kazar, David Nichols, John Zsarnay and Ivor Durham [2][5].
  • Simple hardware read the machine's six "empty" lights, and software kept track of how long the bottles in each column had been inside [2][4][5].
  • Through a command called finger, anyone on the ARPANET, the network that grew into the internet, could check the machine [2][3][4][5].
  • Another account on CMU's pages recalls an earlier version from the mid-1970s, and Carnegie Mellon now describes the machine as the humble start of the Internet of Things [1][3].

A long walk for a Coke

The computer science department at Carnegie Mellon University in Pittsburgh had its own Coke machine, on the third floor of Wean Hall [1][3]. Graduate student volunteers kept it filled, on a schedule that was not always regular [2][3][5]. It was popular, and that was the trouble. People would walk all the way there and find it empty, or freshly loaded with bottles that had not had time to cool [3][4][5].

Craig Everhart, Eddie Caplan and Robert Frederking, writing years later for the department's 25th anniversary symposium, put it with feeling: "there are few more revolting substances that warm Coke; ideally it is served just slightly above freezing" [3].

One day in the early 1980s, David Nichols, a graduate student whose office was "a relatively long way" from the machine, wanted a Coke [1][4][5]. He knew there was a good chance the trip would be wasted. In a 1990 email he remembered what happened next: "Suddenly, I remembered tales of the Prancing Pony at Stanford and realized that we didn't have to put up with this, that we had the technology" [4][5]. The Prancing Pony was a computer-controlled vending machine at the Stanford Artificial Intelligence Laboratory (SAIL), built in the early 1970s [4][5][7]. Nichols "fired off mail to a few friends" and then, as he admits, went to get his Coke anyway [4].

A happy accident in the wiring

Nichols remembered that most of his friends were software people, while what they needed most was a hardware interface. Then came good news. In his words: "Fortunately, unknown to me, John Zsarnay had taken an interest in the idea, and was busily designing the hardware" [4]. Carnegie Mellon's Coke page and IBM's account both credit Zsarnay with the hardware [2][5].

The machine had six columns of bottles. Each column had a small light on its button. The light came on for a few seconds whenever a bottle was sold, and stayed on when the column was empty [3][4][5]. The machine also held back two reserve bottles at the bottom of each column, so even an "empty" column still had two left inside [4][5]. Nichols was delighted at how well this suited them: "If we had asked Coke to design a machine to allow us to build such a beast, we wouldn't have done much better" [4].

Zsarnay built a small board that sensed those six lights and sent their state down a serial line to a computer [3][4][5]. That computer was a gateway linked to CMUA, the department's main PDP-10 computer [3][4][5]. Mike Kazar wrote the software on it. It checked the lights over and over, every second or so, and worked out from the pattern when a bottle was sold and when a column ran out [4][5]. It then counted how long the bottles in each column had been in the machine [2][3][4][5].

The system never measured temperature. As Nichols put it, "We never attempted to report temperatures to the user, only times in the machine" [4]. After about three hours inside, a bottle was counted as cold [3][5]. Because the software also tracked the two reserve bottles, a regular could even spot the last cold bottle left over from before the refill [4][5].

Finger coke

Nichols wrote the first program people used to ask for the status, a command simply called "coke", and documented how to talk to the machine so others could write their own [2][4]. Ivor Durham then linked it to finger, a standard command that normally tells you whether a person is logged in [2][3][4][5]. If you fingered the made-up user "coke", you got the state of each column instead [3][4].

Because finger worked across the ARPANET, the machine could be checked from far beyond the building [3][4][5]. At the time, the ARPANET linked only a few hundred computers [5][6]. Tom Lane, one of the people who wrote down the machine's history, joked about it: "Not that it would do you much good if you were a few thousand miles away..." [3].

Closer to home it caught on fast. Kazar later said it became "pretty popular pretty fast", and that checking the machine before going downstairs became "standard procedure" [5]. He himself was not a customer: "I never used it, except to see if it was working," he said. "I never liked Coke" [5].

Which came first?

On dates, the sources do not fully agree. Carnegie Mellon's Coke machine page and IBM's account give 1982 for this interface, and a CMU news story says the early 1980s [1][2][5]. But another account on the same CMU pages, by Tom Lane, places the start of the trouble in the mid-1970s and recalls an earlier version that used micro-switches wired to CMUA, the PDP-10, though he admits he is "a little fuzzy about the dates" [3]. Nichols himself called the idea "hardly a new idea" [4]. So the safest thing to say is that Carnegie Mellon's Coke machine was online by 1982, and perhaps earlier.

New bottles, new machines

The story did not end with one machine. A nearby M&M machine was later wired up as well [3][4][5]. Then the local bottler stopped supplying the old curved glass bottles that the machine was built for, and it was replaced with a newer model [3][4][5]. Here the accounts differ. Carnegie Mellon's pages record the newer machine being connected again in the early 1990s and a second-generation interface in 1995, while IBM's account says the replacement was never connected to the internet [2][3][5]. In the 2000s, Kevin Watkins, Mike Vande Weghe and Chuck Rosenberg worked on the machine again [2][5]. By 2014 the department's Coke machine stood in the Gates building [2][5].

Looking back, the people involved were modest about it. "We didn't think we were doing anything that amazing," Nichols said in 2023 [1]. Kazar remembered a running joke from 1982 that one day your toaster would be on the internet. "People laughed at that," he said [5]. Today Carnegie Mellon describes the Coke machine as the humble beginning of the Internet of Things [1].

What it means for a Thai business today

The pattern is the same one behind many connected devices today. Something physical gives a simple signal, the signal travels over a network, and people get an answer without walking over to look. It might be stock on a shelf, the temperature of a cold room, or a machine on a production line.

  • Start with a small question people ask every day, such as "is it in stock?" or "is it ready?".
  • Use the signals our equipment already gives, as the team did with the "empty" lights, before buying new sensors.
  • Measure what we can and be honest about it. The team counted time, not temperature, and said so.
  • Put the answer where people already look, as finger did for the people of 1982.

Useful systems do not always begin as big projects. Sometimes they begin with one person tired of a wasted walk, a few friends willing to help, and a machine that happens to have the right lights.

Sources

  1. Carnegie Mellon University Computer Science Department, Decoding the Internet of Things (6 April 2023)
  2. Carnegie Mellon University School of Computer Science, CMU SCS Coke Machine home page (historical page, last modified 2005)
  3. Carnegie Mellon University School of Computer Science, The "Only" Coke Machine on the Internet (long history, with accounts by Tom Lane, Steve Berman, Craig Everhart, Eddie Caplan, Robert Frederking and Glenn Meter)
  4. Carnegie Mellon University School of Computer Science, Coke machine history emails by Craig Everhart (11 June 1990), David Nichols (23 July 1990) and Eddie Caplan (24 July 1990)
  5. IBM, The little-known story of the first IoT device (Jordan Teicher)
  6. RFC 847, Summary of Smallberg Surveys (A. Westine, D. Smallberg, J. Postel, February 1983)
  7. Les Earnest, Sail Away (history of the Stanford Artificial Intelligence Laboratory), Bitsavers archive

Written by

Senna Labs

IT Consulting & Software development

Let’s stay in touch

Stay updated with the latest tech trends in your inbox.

Dive into 300+ articles read by thousands every day

Related articles & Insights

Discover expert insights, practical guides, and industry perspectives related to this service.

Explore all

Contact · [email protected]

Have an idea?

Tell us where you stand today. We will help you find the next step.

Let's talk