Proximity poster
We had a project week in Minerva, where we needed to work with data, which is in a broad sense - information. So I thought of information that peoeple don't want to see and how it can interact with it. The proximity poster is a poster that reads analog.data from the Arduino (and proximity sensor) and reacts to attention, so if you come closer, it reveals more information for you to see.
import processing.serial.*;
    import cc.arduino.*;
    
    Arduino arduino; //creates arduino object
    color back = color(255); //variables for the 2 colors
    
    int sensor= 0;
    float read;
    float val;
    
    
    float yoff = 0.0; // 2nd dimension of perlin noise
    PImage  oceanTexture;
    PFont futuraBold;
    PFont futura;
    
    void setup() {
        size(400, 525);
        pixelDensity(2);
        arduino = new Arduino(this, "/dev/cu.usbmodem14301", 57600); //sets up arduino
        arduino.pinMode(sensor, Arduino.INPUT);//setup pins to be input (A0 =0?)
        background(back);
        
     futuraBold = createFont("futura com bold condensed.ttf", 32);
     futura = createFont("futura com medium.ttf", 32);
        
     oceanTexture = loadImage("12_seaLevel_left.png");
    
    
    }
    
    void draw() {
      // Get input value
      read = arduino.analogRead(sensor) / 600.0;
      val = lerp(read, val, 0.99);
      
      print(read);
      println(val);
      
      noStroke();
      washout();
    
    
      
      // Typography layers
      textAlign(CENTER);
         image(oceanTexture, width/2 - 200, 320, width,180);
      scale(1, 1.3);
      textFont(futuraBold, 110);
      fill(0, 43, 61);
      text("SEA LEVEL", width / 2, height /4);
      scale(1,1);
      
      textStroked("has risen nearly",
      30, width / 2, height /4 + 35);
      textStroked("178 mm",
      46, width / 2, height /2 - 45);
      textStroked("over the past 100 years",
      30, width / 2, height /2 - 10);
      textStroked("more information: https://climate.nasa.gov/ ",
      14, width / 2, height /2 + 120);
      perlinWaves();
    
      
    }
    
    void textStroked(String s, int size, int x, int y) {
      fill(0, 43, 61);
      textFont(futura);
      textSize(size);
      text(s, x, y);
    }
    
    
    
    void debugEllipse()  {
      // Ellipse
      float circleX = map(val, 0, 680, 0, width); //use to callibrate  
      ellipse(circleX * width, 300,30, 30);
    }
    
    
    void perlinWaves() {
     
      
      // Perlin shit
      // We are going to draw a polygon out of the wave points
      beginShape();
       
    
      //let xoff = 0; // Option #1: 2D Noise
      float xoff = yoff; // Option #2: 1D Noise
    
      // Iterate over horizontal pixels
      for (float x = 0; x <= width; x += 10) {
        // Calculate a y value according to noise, map to
    
        // Option #1: 2D Noise
        //let y = map(noise(xoff, yoff), 0, 1, 200, 300);
    
        // Option #2: 1D Noise
        
         float y = map(noise(xoff) / 2, 1, 0, 0, val * height * 3);
    
        // Set the vertex
        vertex(x, y);
        // Increment x dimension for noise
        xoff += 0.05;
      }
      // increment y dimension for noise
      yoff += 0.01;
      fill(14, 117, 160);
    
      stroke(0, 84, 117);
      vertex(width, height);
      vertex(0, height);
      endShape(CLOSE);
    }
    
    void washout() {
      // Washout
      fill(back, 20);
      rect(0, 0, width, height);
      fill(255); 
    }
    
— portfolio —