Arduino Basics #3: Control WebGL landscape with analog input2.2 — Physical Computing
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:
And this is the code of 3D landscape, where camera positioning is defined by the potentiometer input:
And here is how it works: