pcomp: ideas for the final

i’m interested in exploring physical, mechanical manifestations of digital processes. here are the two ideas i’m playing with:

1. an eyeball mounted to my laptop camera that tracks my motion and blinks. i’d use p5.js with the clmtrackr library to communicate serially with the arduino.

sources to review for building the eyeball mechanism:


eye muscles
eye muscles

2. a physical array. when you put different objects in the array, they’re represented visually in p5. there are a few ways this could work.

one way is to have a specific set of objects, each with a unique weight, where each weight corresponds to an object in p5. so p5 “knows” when you put a given object on the force sensor and draws the thing associated with that weight.

another, more interesting way, would use a laptop’s built-in camera to render, in p5, the object that you put in the array. i’m not sure where the interaction would come in. maybe certain object characteristics would trigger motors that shift the array, maybe with a conveyer belt. or maybe you would use a crank. i have always wanted to build something with a crank…

look at this beautiful thing
look at this beautiful thing

this project would be a neat (and much-needed, for me) way to spend time understanding how electricity becomes legible to computers and ultimately legible to humans. i think its conceptual strength would really depend on what kinds of objects you could physically place in the array.

pcomp: better late than never, part ii

i also just finished the serial output from p5 lab with minimal mishaps along the way, which is great because i’ll need it for my final project. the lab didn’t include the printList() function for showing available ports, but i put it in when i couldn’t get the light working after a few tries. that’s when i finally realized my program wasn’t working because i was missing one of these >>>> \ <<<< in the port name.


arduino code

p5 code


pcomp: better late than never

i finally completed the duplex serial communication lab. it didn’t hurt that my midterm was a (very slight) variation on this scenario.

there she is


arduino code

p5 code


pcomp: if pcomp and mozilla x-ray goggles had a baby

it would be our pcomp midterm dream come true!

here are the mozilla x-ray goggles, a super neat interactive tool that teaches you about html and css by letting you explore how websites are structured and play around with content.

what if touchier, feelier people could also experiment with website content using dials and buttons instead of just the touchpad interface?

to see what this would be like, angela and i are taking a website, copying all of its guts into p5 using firefox developer tools, and seeing if we can control some DOM elements using the arduino.

we started with the new york times homepage, but the index.html file was so enormous that it was tough to navigate. we switched to david sassoon’s project, inside climate news, instead. i’ve stripped the index.html file to about a third of its original size in order to keep the project manageable. i’m keeping the header, main menus, cover story, and right column—ditching footer and secondary news stories.

now that that’s done, i’ve used the firefox developer tools to copy the css stylesheet into p5, erased the link to the old stylesheet, linked to the new one in index.html with this:

i’m totally positive i have lots of stuff i don’t need in the index, but i don’t know what i can safely get rid of, so i’m keeping it around for now. the p5 editor looks like this:
Screen Shot 2015-10-16 at 10.42.08 PM

next steps are:

  • deciding which elements on the page we want to use potentiometers and buttons to change,
  • finding the parts of the stylesheet and index that affect those elements, and
  • writing the code to connect the analog and digital inputs to a variable that affects those elements.


using the existing index.html was a pain. i re-built a much simpler version of the site (screen shot below), and i’ve figured out how to use p5 to get one element to change.

i’m having trouble with syntax, but the dream is to be able to change the front image to an array that i can scroll through with a potentiometer.

icn remix


pcomp: asynchronous serial communications lab

i made some potentiometers so i could do the serial communications lab.


it’s been a while since i played with the arduino, so i wanted to test the push button after i’d plugged it in.

button on digital input 4
button on digital input 4

when i opened up the serial monitor, i got a “1” when the button was pressed and “0” when the button wasn’t pressed. all good! so i attached two potentiometers.

two pots attached at A0 and A1
two pots attached at A0 and A1

wrote the code to read A0:

but got really weird readings from the serial monitor.

Screen Shot 2015-10-10 at 10.24.30 PM

to be continued.

update: all figured out! the red wires (+) on my potentiometers were in the wrong place. they were in the lettered columns of the breadboard, unconnected to power, instead of in the (+) columns.

rewired potentiometers
rewired potentiometers

pcomp: sidetracked at the junk shelf

i ended up at the junk shelf tonight and took apart this keyboard. this flexible mat looks like a circuit. i’m guessing that the plastic is not conductive, but that all those metal lines are. the keys sit on top of a non-conductive rubber thing. maybe, when someone presses a key, it pushes the conductive dots so they make contact with the metal board underneath them, completing a circuit. maybe each key is a switch. if that’s the case, i wonder how complicated it would be to re-program the keys to make little illustrations instead of letters.

inside a logitech keyboard
flexible keyboard circuit board
metal plate underneath
metal plate underneath


today, we had a special synthesis session where all the first-year students were assigned a partner and asked to *synthesize* our knowledge from pcomp and icm—so, to make something that used arduino and p5. for most of us, this was our first time ever making these two platforms talk to each other.

my partner was ella dagan and we made this silly visual thing that’s controlled by a force sensor. we used the force input to determine the opacity of the circles. if you press really hard, you get a special message!

circles n squares

don and his partner also used a force sensor to make their hypnotic color-changing thing.


pcomp: servo motor

we’ve been talking about connecting analog sensors to servo motors. in class and in labs, tom uses a potentiometer to control the motor, but CONFESSION the starter kit i bought for class didn’t come with a potentiometer and i was trying to scrape by without one. so. i tried the lab using a force sensor. either my code or wiring is wonky and the video below shows how not to use a motor, but i actually liked the effect. when you touch the force sensor, the motor stops twitching. as someone who finds touch really calming, this interaction resonated with me.

i also find rain really calming and i’ve been wanting to make a rain sketch for my computational media class. i’m imagining a future project where i use the force sensor reading to control an illustration of rain in p5 and a servo motor. as you press the force sensor, it rains harder and the servo stops twitching.


using an analog sensor to control servo motor