So first, I know it’s just slightly uninspired, my original intention was to do something off the sketch we went over in class but I’m stuck home (with my first cold of year!) with only two working pots, and if need be will revisit it later on.
(I was some issues with my hands soldering Friday– but at least one of them worked!)
And so it was the basic slider, I changed the string line because I wanted it to go fully across instead of stopping halfway.
And the Physical Pixel setup!
And here is the video:
Got a little adventurous and added a second LED, swapped the commands so that ‘G’ turned on the green LED, and ‘R’ the red.
And then tried my hand at imputing binary/ ASCII to change the LED brightness:
Now I had some issues with the code on the p5 end…I couldn’t get it to work.
Highlighted are the lines, and below are the messages from the console. I mean the program still worked but I would get those lines still. I even added the serialport.js in, made sure the monitor in the Arduino IDE was closed, even tired it with serial port app on and off.
Uncaught TypeError: p5.SerialPort is not a constructor (sketch: line 8)
Uncaught TypeError: Cannot read property ‘write’ of undefined (sketch: line 33)
Uncaught TypeError: Cannot read property ‘write’ of undefined (sketch: line 40)