ICM & PCOM Synthesis / Week 5


For this Synthesis workshop, I got my first introduction to the possibilities of what PCOM and ICM can do when they listen to each other. It was nice to be with the entire class in this hackathon-like vibe and to see what cool things would come out of this synthesis over pizza.

The design challenge was to create a Physical Variable. My partner, Roi Lev and I started off with connecting the serial communication and using a potentiometer to dim a red ellipse that was drawn in the p5.js sketch below.

We then took four colored buttons (red, green, blue and yellow) and attached them to the breadboard. Roi then programmed the buttons in p5.js to draw in the color that is pressed. For instance, to color in red, you need to hold down the red button while using your mouse to draw on the p5.js screen.


img_2172closeup of the circuit and breadboard


img_2163user testing


var serial; // variable to hold an instance of the serialport library
var sensorValue = 0;  // ellipse position

function setup() {
  createCanvas(600, 400);
  serial = new p5.SerialPort();  
  // make a new instance of serialport library
  serial.on('list', printList);  
  // callback function for serialport list event
  serial.on('data', serialEvent);  
  // callback for new data coming in
    serial.list(); // list the serial ports
    serial.open("/dev/cu.usbmodem1421"); // open a port

function draw() {
  //text(sensorValue, 20, 20);
    if (sensorValue > 1 && sensorValue < 500){
    }else if (sensorValue > 500 && sensorValue < 900){
    }else if (sensorValue > 900 && sensorValue < 1010){
    }else if (sensorValue > 1010){
    ellipse(mouseX, mouseY, 30, 30);

 function mousePressed(){

// get the list of ports:
function printList(portList) {
 for (var i = 0; i < portList.length; i++) {
    // Display the list the console:
     println(i + " " + portList[i]);

function serialEvent() {
    var inString = serial.readLine();
    if (inString.length > 0) {
      inString = inString.trim();
        //sensorValue = Number(inString/4);
        sensorValue = Number(inString);


Leave a Reply