[p-com] Project 2: Spherical landscaping or (the cold, lonely, glowing orb experience)

Final p5 code: internal interaction / Arduino interaction

Final Arduino code: here

1. Ideation

Last week I wrote about my interest in discovering the relationship between “organic” hardwares and “artificial” nature. I know it was super vague, but there were a couple of things I was sure of: I’m interested in creating breadboard-free, exposed circuitry, I would like the media to present natural elements (weather, scenery, plants, etc.), I would be using Arduino Nano’s built-in IMU as a sensor. Not a lot to work with, but enough to start exploring.

After a long week of minor experiments, constructive criticism from friends (Anh) and teacher (Tom), and talks with my 3 roommates with varying tech knowledge (I found it very helpful when I had to describe my project to people outside of ITP), I learned that immediate interactive feedback would be more compelling comparing to the gradual changes I previously proposed. Though I’m still interested in making time-based projects in the future, I decided to go with a simple “snowglobe” interaction.

Made a noise ball with perlin noise & accelerometer and asked my roommate to play

The new version would be to create a digital landscape, its time and lighting changing according to the rotation of the ball, a much more straightforward relationship between the micro physical architecture and the macro digital environment.

Nonetheless this is still a very ambitious project. As I wrote this on Sunday night I have not yet any idea how far I’ll be able to go. There are tons of new things I had to learn and explore: using the IMU sensor, wireless connection, visuals, hardware and fabrication craft.

2. p5 landscape

Style Inspiration: Gris by Nomada Studio, Anokhee’s generative landscape, Petr Mitev’s generative landscape, LingDong’s Shan Shui

Snippets of code I thankfully referenced: I learned Perlin Noise for making the moving mountains by playing with the p5 noise() reference, and the Coding Train video series on perlin noise; linear gradient for the sky was altered from the p5 example page, and Boids for making those birds was… mostly directly copied from the flocking example. I wasn’t able to understand it fully, but felt like at one point I have to properly learn about Boids.

I also made color palettes in Illustrator to get RBG values.

The colors for scene change were simply mapped based on Mouse position (later changed into Arduino rotation). For mountains, fields and trees I just had to map the fill colors, and for the gradient I mapped both top and bottom colors in the gradient stroke. In a MouseClick function (later changed into Accelerometer value), birds fly out.

Here’s the p5 landscape sketch before Arduino connection.

3. Coding the Arduino

Using Nano’s built-in IMU for the first time, I was able to understand the Madgewick Library and Tom’s example code, thanks to help from Tom, Brandon, and Mai (check out their project also using the Madgewick Library). Unfortunately I forgot to take a video, but basically the Madgewick library uses Accelerometer and Gyroscope readings to inform rotational values, so that we get heading (yaw), pitch and roll, which are airplane terminologies to indicate rotation on xyz axises.

Another component on the Arduino side is internal LEDs behavior. I thought it would be fun to make the light breathe. I also used a potentiometer to control its breathing speed.

Here’s the Arduino code:

const int led = 2;

int brightness = 0;
int fadeAmount = 4;    // smaller number is slower fade

void setup() {
  pinMode(led, OUTPUT);
}

void loop() {
  analogWrite(led, brightness);
  int sensorValue = analogRead(A0)/51; //potentiometer
    Serial.println(sensorValue);
  int fadeAmount = sensorValue + 4 ;
  
  brightness = brightness + fadeAmount;
  // when it's maximum brightness, reverse fade
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }  
  delay(30);
}

The second light joined in, and I changed my mind. Changing breathing speed doesn’t make any sense. It doesn’t align well with the p5 sketch. I referred back to my initial brainstorming notes from a week ago and found an idea that I liked — when the Arduino gets picked up or moved around, breathing blue light turn off, and the other light turn on.

Finally, we move on to the 1am overachieving part where I switched that orange LED into an (anode, different from a cathode) RGB LED. I mapped the RGB values according to the pitch value that also controls the p5, so that its color changes according to the “lighting” in the digital landscape.

Unlike the orange LED that only writes one analog value for brightness, the RGB LED has three — and it refused to turn off when I attempted to put all of its analog value to sleep. I attempted many different ways but… no good solution. For now, I’ve successfully made it pretty dim when not used, but it’s not entirely turned off.

*Actually* connecting Arduino to p5, serial addition. This is filmed before August helped me made the trees random and not look like a weirdly neat tree cult.

Of course, in order to encase it, This little Nano needs to go wireless. I spent my Monday learning about Bluetooth LE and p5 BLE. It has not yet worked, so I had to put it aside and start fabrication first.

Arduino code is available on GitHub!

4. Fabrication & putting it together

Discovering the genre of circuit sculpture just this past month completely changed me. I spent hours looking at Mohit Bhoite‘s delicate artworks, getting overwhelmingly emotional about the beauty of hardwares. I’ve been learning a bit in another class, Cybernetics of Sex, about the history of software and how it was coded female at first while hardware was coded male (I’ll write a separate blog post about this), which made me wonder about making emotional, “feminine” hardware.

Let’s not take it too far with the theories. Obviously I’ve never made a freeform circuit before, so I sought out some help from fabrication experts Ben and Arnarb, and was told to give it plenty of time because it’s much more complex than I’d think. I decided to take every step and proceed carefully, starting with technical drawings.

this is drawing ver 2, updated after the play test

Based on the sketch, I built a model with wires to test structure stability.

My insecurity kicked in while putting together the Arduino Nano board taped on a 9V battery model, both made out of cardboard. All my classmates have been sawing wood and cutting acrylic and I’m here making ugly-looking tiny cardboard models, having no idea what my next step is, but I have to believe in myself and push through.

Before going into metal working, I conducted play testing with the wire structure. Many cohorts responded with their ball rotation assumptions, and raised visual aid ideas that would indicate the interactions. Thank you cohorts.

Featured cohort: Vivien

How they assumed the player action to be had a huge range of differences, so I had to go with the majority when altering Arduino facing and rotation. I also pointed both LEDs, facing opposite directions, on the same Axis, rather than on different axis like my initial model.

I went back to investigate in BLE, but didn’t get any further. Disappointed to say that I’d have to put it aside, and find another time to figure it out. To compensate for the cable that was NOT a part of my original design, I had to burn a hole on my ball, and let the cable hang from there… I will speed through the part where I broke many balls attempting to drill, cut and melt with soldering iron, and it was not pleasant.

Gallery for fabrication and documentation process (should’ve taken more photos / done a time lapse but my phone ran out of memory)! More to come.

I’d like to thank Anh Le for inspiring and helping me through my extremely self-doubting ideation phase, my roommates and cohorts (Vivien, Eric, Alan, Todd, Daniel Ryan) for play testing, Arnab┬áChakravarty and Ben Light for fabrication advices, August Luhrs for their coding excellency, David Rios, Brandon Roots, Mai Clear and Jingyao Shao for Arduino support, Jezzy Lu for documentation and long nights on the floor, and of course Tom Igoe for pushing me to think further and do more (and sometimes do less).

5. Feedback, reflection, moving forward

Leave a Reply

Your email address will not be published. Required fields are marked *