# P5.bots connect arduino to public website

**URL:** <https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133>\
**Category:** Libraries\
**Created:** [February 26, 2020, 8:47am UTC](https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133 "2020-02-26T08:47:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![botbotbot](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/botbotbot/32/8192_2.png) [@botbotbot](https://discourse.processing.org/u/botbotbot)\
**Post date:** [February 26, 2020, 8:47am UTC](https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133/1 "2020-02-26T08:47:03Z")

</div>

Hi all! I’m new to networking so bear with me. I want to be able to instantly control a public website through some sensor input on an arduino. Let say I want the color of the background to change when i push a physical button.

So far I have been able to use arduino + firmata + P5.js + P5.bots + node.js to make a website that responds instantly to a button press. See video here: [https://www.dropbox.com/s/rznwdv9t7x2fyfn/boom.mp4?dl=0](https://www.dropbox.com/s/rznwdv9t7x2fyfn/boom.mp4?dl=0)

This works fine on localhost on the pc connected to the arduino but i want this to work on a public website. How would i do this?

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 29, 2020, 4:51am UTC](https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133/2 "2020-02-29T04:51:41Z")

</div>

JavaScript is client-side. You can use it to change a client-side site in a browser, but if you want to send a message that changes a how a public site appears in other browsers, then you need to send a message to the server and the server then needs to send a message to other clients.

For that, I believe that the basic p5.js examples are with node + [socket.io](http://socket.io) – see for example:

- [https://github.com/processing/p5.js/wiki/p5.js,-node.js,-socket.io](https://github.com/processing/p5.js/wiki/p5.js,-node.js,-socket.io)
