This time we should play around an analog input. For this experiment, I am going to use a potentiometer.

Previously, I controlled LEDs remotely using a web UI, so why not to turn it over and control web content with analog input on the Arduino board. Another technology I am interested in exploring is WebGL, which is used to create 3D objects and environment on the web.

We have this code to read data from Arduino and send it to our web app via PubNub:

See the Pen Analog input by Roman Trilo (@romantrilo) on CodePen.

And this is the code of 3D landscape, where camera positioning is defined by the potentiometer input:

See the Pen Potentiometer by Roman Trilo (@romantrilo) on CodePen.

And here is how it works: