Use arduino to control electronics without being on a local server

Hey guys! is it possible to use the arduino act as a a webserver and control electronics at the same time? What I am trying to do is control some lights with the arduino. People can go on a specific website and click a button and the signal would relay it to my ardunio which would turn on the light. Depending on the amount of people that click on the button, the intensity will vary.

You can have control buttons in web pages not served from the arduino. You need to use the full url in the button html.

An Arduino can act as a web server and control electronics at the same time, but it provides an extremely feeble web server which won't support lots of concurrent connections and doesn't provide authentication, any complex content encoding or the ability to serve out big complicated resources. You probably don't want to have people accessing your Arduino directly. A better approach would be to write a web app hosted on a PC that serves out the page containing the buttons and keeps track of the rate of button clicks; it would then communicate with the Arduino to make the Arduino output the corresponding brightness. Communication between the web app and the Arduino could be either via the serial USB port, or via Ethernet/WiFi. If you're going via the network then it would be reasonable to have the Arduino provide a web service to receive the brightness commands from the webapp but the service would only be used by the PC web app and not accessed directly by your end users.

How about using a raspberry pi as the webserver doing all remote internet stuff and get your new program on it to pipe text output to /dev/ttyUSB0 instead of to stdout so that your arduino program only waits for one-line local serial text comparable to "raspberry333 : d0 ON d1 ON d2 OFF d3 ON d4 OFF d5 ON d6 ON" That divides the tasks so that your webserver is contemporary and your light switch is minimal.

I do something else with a raspbery pi logging usb-serial out from an arduino. Beware as the arduino timekeeping is a bit off so I had to make a fourline linux script at the raspberry pi end to "autorestart" logging if the time synch problem caused a crash at the pi.

PeterH: An Arduino can act as a web server and control electronics at the same time, but it provides an extremely feeble web server which won't support lots of concurrent connections and doesn't provide authentication, any complex content encoding or the ability to serve out big complicated resources. You probably don't want to have people accessing your Arduino directly. A better approach would be to write a web app hosted on a PC that serves out the page containing the buttons and keeps track of the rate of button clicks; it would then communicate with the Arduino to make the Arduino output the corresponding brightness. Communication between the web app and the Arduino could be either via the serial USB port, or via Ethernet/WiFi. If you're going via the network then it would be reasonable to have the Arduino provide a web service to receive the brightness commands from the webapp but the service would only be used by the PC web app and not accessed directly by your end users.

I think this is what I am going to do. So the website itself will control the Arduino and people won't have direct access to the Arduino right? Do you know of any source that you would recommend to implement this? I have looked at a lot of projects and I don't know which one would fit this purpose the most. THANK YOU!