Drinks Mixing Machine

Hi everybody!
We're french guys in a Senior Grade specialized in Engineering Sciences and we need help for an ending year project :sweat_smile:
Our project is a Drinks mixing machine which can be controlled by a local webserver ( in this case we used a PC ) by means of an arduino uno. The webserver must be able to send data to the arduino. We got an internet shield and an arduino uno starter kit.
We just need to know which code we should use ( through an xml file? How does it works? ). We don't know much about how the arduino can communicate with a local webserver ( PC ). Basically, we want to push commands from pc to arduino via Ethernet cable!

Thanks for your help! :slight_smile:

An easy(ish) way to do it would be to have the Uno act as an ethernet client and poll the web server with GET requests to see if it has work to do. You'll find examples of using the client here.

The page the arduino hits can either tell you "nothing to do" or "mix this drink". Mix this drink could be a drink identifier, which is already known to the arduino - i.e. recipe stored in progmem. Alternatively, the drink identifier might be passed back to another web page to get the recipe, which you would need to parse out of the page data. Or, the web server might just respond with the appropriate recipe directly.

This approach has a number of problems - it isn't fault tolerant and it's a bit of a waste of bandwidth to be pinging the server all the time to see if there is anything to do. An alternative would be using a UDP packet to tell the arduino which recipe to mix and build a little acknowledgement protocol to make it more reliable.

Hi! :slight_smile:
Very sorry for not replying and not being active. We were so busy with our exams haha :p.
Now your idea is very intresting, because our plan is to connect the UNO directly by ethernet to a local server (closed network). so the ping issue is not a problem. I would love to know more details about the "easy(ish) way", because that may just work! We will use a Debian server as the host / web server for this project.

About the "Mix Drinks" command, here are some detail :

  • The mixing machine can mix up to 3 diffrent juices.
  • On the website, we can choose what we will mix :
    ex: Juice 1: 20%, Juice 2: 70%, Juice 3: 10% (Doesn't have to be numbers by multiple of 10, any value is fine from 0 to 100).

Thanks for the reply and all the help!!! 8)