Connect website to Arduino


For my project I am making an interactive installation. The installation is basically a vending machine with just a servo. I want to connect the servo to an upload button on the web. When a file has been submitted with the upload button the servo needs to rotate so that something can come out of the vending machine.
I have not made a website with an upload button yet. How could I make a simple website with an upload button that is connected to the servo motor?

what type of Arduino will be in the vending machine? how will it access the Internet?

The Arduino I am using is mkr fox 1200. It could be connecting over the same wifi…right?

I am the wrong person to help with this since I have done so little with websites. But I am interested in the vending mechanism. I want to do something along this line for distributing Halloween treats this October. Where did you find the assembly instructions?

Making the servo rotate on command will be the easy part.

Something like this may help:

Hi, I have made a box with and then just added the square and rectangle at the front and laser cutted it. I then measured the box and added a square platform where the iron is resting on.

This does not have WiFi capabilities…

Sorry, just looked at the wrong Arduino! I am actually using an ESP8266.

and a WiFi router that you control will be available nearby?


Which board?
You can put a simple webserver on an ESP8266 board. If the user and the ESP are on the same LAN (same router), then your idea of a remote button will work just fine.

In my case, I plan to trigger the vend with an MQTT command over WiFi. This way I can make various sensors trigger the vend.

How did you form the delivery spring and how did you connect it to the servo motor?

1 Like

the Arduino could poll from time to time a server (HTTP GET request for example) to see if it needs to deliver something. That would make the Arduino a client of some service hosted somewhere

another option is that the Arduino is the actual web server (requires routing) and so the arduino will know exactly what’s going on server side and can take the right decision for the vending machine

another option is that the Arduino has a web service (or a TCP access) and the web server hosted somewhere would know how to reach that specific arduino (routing involved) to send a GET or TCP request that would trigger the vending machine

1 Like

Thank you! This tutorial helped for me: Build an ESP8266 Web Server - Code and Schematics (NodeMCU) | Random Nerd Tutorials

Do you mean the iron wire by delivery spring? The spring is glued to a circle that is glued to the servo. I still have to perfection and test it so that something can actually come out of the vending machine…

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.