Sending sensor data from Yun to p5.js sketch

Hello guys,

I want to send multiple analog inputs from an Arduino to a p5.js sketch wireless. I have an Arduino Yun, and since it has collected a lot of dust in my drawer, I would really like to use that one for my project (If its suitable ofc).

The general idea is to use analog inputs to control animation etc created in p5.js, while the sketch is viewed on my phone or a tablet. Leaving my laptop out of the picture is the ideal solution - but if it could make life easier to have it working as a middle man in some way, then that would also be alright as a plan B. As long its done wireless. This is also were a USB serial connection is not an option for me, and I hope the Yun's abilities can do the job wireless.

Right now my Yun hosts my p5 sketch, and I’ve used the http request (Heavily inspired by the TemperatureWebPanel example) to send potentiometer data from the Arduino to the sketch. However, I find this solution to be rather slow since I can only make it to update once every second. - this seems like a limitation of using http requests?
If I e.g wants to change the color according to HSB with the potentiometer, I want it to update as frequently as possible.

So my question is if there is a efficient way to establish a faster way to send sensor data from the analog input on my Yun, to the p5.js sketch wireless?

From various google searches I've found som mentioning web-sockets, and node.js, however I've find it hard to get an up-to-date overview of where to start.