Screen Shot 2018-01-27 at 11.00.17 PM.png

Hi.

Welcome to my blog. Here, I document my daily blogs, learning experiences, and some fun projects.

Pcomp Lab: p5js sketch using potentiometer

Pcomp Lab: p5js sketch using potentiometer

This week, I used the analog input that I received from a potentiometer to execute a digital output on a p5js sketch.

arduino code.PNG

My Arduino code command said to read the analog input it received from pin A0 and map the 0 – 1023 bits to 0 – 255 bytes. 

p5.PNG

I then coded circles in my p5 sketch and mapped the radius of the circle to the bytes it was receiving from my potentiometer. Hence, as I turned the knob of my potentiometer, the radius of the circles increased and decreased respectively. To view the final outcome, go the video linked below. 

Serial output from p5.js

Serial output from p5.js

My Branding: Style Guide

My Branding: Style Guide