t2yper
t2yper
Studio 2.0
15 posts
a blog where art and algorithms meet.
Don't wanna be here? Send us removal request.
t2yper · 1 month ago
Text
Lab 9: Servo Motor Shimmy
In the servo motor lab, the goal was to program a standard servo motor using an Arduino to perform a choreographed “dance.” I connected a 5V hobby servo to an Arduino Uno and wrote a sequence of movements that gave the motor a rhythmic, shimmying effect. It slightly reminded me of the beginning part of “Shimmy Shimmy Ya” by Ol’ Dirty Bastard—each little jolt of the servo felt like it was hitting the beat, bouncing left and right in this mechanical groove.
Tumblr media Tumblr media Tumblr media
To start, I connected the servo motor to the Arduino using a simple wiring setup. The power and ground pins of the servo were connected to 5V and GND on the Arduino, and the signal wire was connected to analog pin A0. I also had a second set of power and ground lines running directly to the servo. After installing the Servo library in the Arduino IDE, I was ready to get the motor moving.
Here’s the code I used to make it “dance”:
#include <Servo.h> // include servo library
Servo servo; // create servo object
void setup() {
servo.attach(A0); // attaches the servo on pin A0 to the servo object
}
void loop() {
servo.write(2000);
delay(100);
servo.write(170);
delay(50);
servo.write(40);
delay(100);
servo.write(0);
delay(0);
servo.write(1000);
delay(150);
servo.write(1250);
}
This loop sends the servo to a series of angles with short delays between them, which creates a stuttering, shimmy-like motion. The timing was key—I had to play around with the delays and angle values until I got a rhythm that felt intentional and dance-like. The result was a fun, jittery little movement that definitely hit three or more distinct positions. I didn’t use a potentiometer or anything fancy—just clean wiring and code.
One of the biggest things I learned was how servo motors actually operate. I went into this thinking the motor might spin like a wheel continuously, but I was surprised to find out it moves to set positions and holds there. That made it more like choreography than just rotation. I also learned about how PWM (pulse width modulation) is used to control the servo’s position and how timing impacts its movement flow.
I didn’t run into any major technical issues during this lab. The most challenging part was just having patience as I adjusted the angles and timing until the dance looked right. It was also fun to see how changing just one delay or angle could completely alter the rhythm of the movement.
In the end, this lab made me see servos not just as mechanical parts, but as expressive components. It was simple but cool to program a little “performance,” and it helped me understand the basics of motion control in physical computing. The shimmy dance might not win any awards, but it definitely had style.
0 notes
t2yper · 1 month ago
Text
Lab 9: Servo Motor
For this lab, our goal was to program a standard servo motor using an Arduino to perform a choreographed “dance.” I connected a 5V hobby servo to an Arduino Uno and wrote a sequence of movements that gave the motor a rhythmic, shimmying effect. It reminded me of the song “Shimmy Shimmy Ya” by Ol’ Dirty Bastard—each little jolt of the servo felt like it was hitting the beat, bouncing left and right in this mechanical groove.
To start, I connected the servo motor to the Arduino using a simple wiring setup. The power and ground pins of the servo were connected to 5V and GND on the Arduino, and the signal wire was connected to analog pin A0. I also had a second set of power and ground lines running directly to the servo. After installing the Servo library in the Arduino IDE, I was ready to get the motor moving.
Here’s the code I used to make it “dance”:
#include <Servo.h> //include servo library
Servo servo; //create servo object|
//int x = 0;|
void setup() {
servo.attach(A0); // attaches the servo on pin 9 to the servo object
//Serial.Input( 9600);
}
void loop()
{
servo.write (2000);
delay (100) ;
servo.write (170);
delay (50);
servo.write (40);
delay (100) ;
servo.write(0);
delay (0);
servo.write (1000);
delay (150) ;
servo.write(1250);
}
This loop sends the servo to a series of angles with short delays between them, which creates a stuttering, shimmy-like motion. The timing was key—I had to play around with the delays and angle values until I got a rhythm that felt intentional and dance-like. The result was a fun, jittery little movement that definitely hit three or more distinct positions. I didn’t use a potentiometer or anything fancy—just clean wiring and code.
One of the biggest things I learned was how servo motors actually operate. I went into this thinking the motor might spin like a wheel continuously, but I was surprised to find out it moves to set positions and holds there. That made it more like choreography than just rotation. I also learned about how PWM (pulse width modulation) is used to control the servo’s position and how timing impacts its movement flow.
I didn’t run into any major technical issues during this lab. The most challenging part was just having patience as I adjusted the angles and timing until the dance looked right. It was also fun to see how changing just one delay or angle could completely alter the rhythm of the movement.
In the end, this lab made me see servos not just as mechanical parts, but as expressive components. It was simple but cool to program a little “performance,” and it helped me understand the basics of motion control in physical computing. The shimmy dance might not win any awards, but it definitely had style.
0 notes
t2yper · 1 month ago
Text
Spring Break – BreakCore Music Player
Final Project
For my final project in physical computing, I designed and built a digital musical instrument that I call the Spring Break – BreakCore Music Player. Drawing inspiration from the New Interfaces for Musical Expression (NIME) movement, this instrument transforms hand gestures into musical actions, allowing me to perform and manipulate breakcore-style audio using two ultrasonic distance sensors connected to an Arduino and mapped into Max MSP. It’s a controller, a performance tool, and a kind of interactive sculpture all in one—and it really made me feel like I was DJing a rave set with my hands.
Tumblr media Tumblr media
The original concept came together as I experimented with the HC-SR04 distance sensors. I had initially planned to use motion sensors, but they proved too difficult to wire. After talking with someone more experienced, I pivoted to ultrasonic sensors since they offer similar spatial sensing but with more reliable outputs. Once I got one sensor working, I saw how smoothly it could translate distance into digital signals, so I added a second. This two-sensor setup let me build a kind of “on/off” control system, where each hand movement could start or stop specific layers of music.
Tumblr media Tumblr media Tumblr media Tumblr media
The physical design of the instrument was simple but meaningful. I laser cut a small enclosure using MakerCase and acrylic in the Spelman Innovation Lab, and decorated it with a guitar-shaped design on the front panel to visually signal its purpose as a musical object. Inside the box, I mounted the Arduino and wired both sensors to a single breadboard—something I hadn’t done before, but it worked flawlessly on the first try. The sensors were positioned facing upward so I could hover my hands over them during the performance.
Tumblr media Tumblr media
Left: Arduino Code for first sample, Right: Testing first sample
The Arduino code handled the distance calculations and serial output. Each sensor was triggered in the loop, calculating the distance in centimeters and printing both values as a single line of data. Here's the exact code I used:
const int trigPins[2] = {9, 11};
const int echoPins[2] = {10, 12};
float distances[2];
long duration;
void setup() {
Serial.begin(9600);
for (int i = 0; i < 2; i++) {
pinMode(trigPins[i], OUTPUT);
pinMode(echoPins[i], INPUT);
}
}
void loop() {
for (int i = 0; i < 2; i++) {
// Trigger pulse
digitalWrite(trigPins[i], LOW);
delayMicroseconds(2);
digitalWrite(trigPins[i], HIGH);
delayMicroseconds(10);
digitalWrite(trigPins[i], LOW);
// Read pulse
duration = pulseIn(echoPins[i], HIGH, 30000); // timeout safety
distances[i] = (duration * 0.0343) / 2;
// If no signal, set to 0
if (duration == 0) distances[i] = 0;
// Print to serial
Serial.print(distances[i]);
Serial.print(" ");
}
Serial.println(); // New line
delay(100);
}
In Max MSP, I created a patch that received the serial data from the Arduino, unpacked it, and used simple conditional logic to check whether the hand was within a certain threshold distance—specifically 20 centimeters. If so, it sent a bang that triggered a set of audio samples. Each sensor was mapped to a different set of three layered breakcore audio loops. Here’s the final version of the patch:
Tumblr media
The left and right sides of the patch represent each of the sensors. When a hand is detected within range, it activates all three samples on that side, creating a stacked, textured sound. I didn’t map pitch or volume directly, but the threshold-based triggering gave me solid, real-time control over the performance. The layering of audio and the fast, cut-up loops created that signature breakcore energy I was going for.
When it came time to compose a piece, I built my sound palette from breakcore-inspired loops and samples I either made or found online. The genre naturally lends itself to this kind of chaotic, reactive interaction. Once I tested the first drum loop with my hand and saw it activate in sync with my movement, I knew exactly what direction to go. My final piece was more of an improvised jam session than a strict composition, but that made it feel alive—and I genuinely felt like I was DJing with air gestures.
This project wasn’t easy. Learning Max MSP from scratch was a major challenge. The interface is not beginner-friendly, and figuring out how to parse serial data, unpack values, and link it to audio playback took a lot of trial and error. I also ran into a brief issue where one of my sensors wasn’t showing up in the serial monitor, which I eventually solved by testing it in a separate sketch and reconnecting the wiring. Another challenge was figuring out how to keep the whole build compact—I’d used two breadboards in my midterm, but I managed to wire both sensors on one board for this project, which helped with space and structure.
If I had more time, I’d love to build on this project by introducing more nuanced sound control. Maybe mapping pitch to distance, adding a third sensor for tempo control, or even building a visual interface with responsive lights or projections. I can definitely imagine this evolving into a fully-fledged digital instrument or live performance tool.
More than anything, this project taught me that I can make music with my hands—literally. I now understand how to translate gesture into sound, how to route sensor data into an audio environment like Max MSP, and how to create systems that feel playful and expressive. I walked into this project nervous about how much I didn’t know, and I came out of it with a finished, functional instrument that let me perform a genre I love. That’s something I’ll carry with me well beyond this class.
S.O to the Spelman Innovation Lab, the IL staff and Professor Holmes- I couldn’t have don’t this without you!
xx
0 notes
t2yper · 1 month ago
Text
Lab 10: Neopixel Light Show: Devil May Cry
Tumblr media
For this lab, I attempted to create a Neopixel light show inspired by the color and energy of Devil May Cry, specifically the new Netflix adaptation. Although it wasn’t a traditional painting or piece of fine art, I treated it like one—focusing on the way color, mood, and visual drama played out in the character design and tone of the series. This felt like a really fun crossover between visual storytelling, fan culture, and technical experimentation.
Tumblr media
I used an 18-pixel Neopixel strip and programmed it with an Arduino Uno to display custom light sequences. I had to solder the wires in order to connect the strip to the Arduino Uno.
The main inspiration came from the character Dante, who has stark white hair, a dark red coat, and exists in these intense orange, red, and violet color environments filled with demon energy and flame. So I picked a color palette of white, red, orange, and purple to represent the visual essence of the show.
Tumblr media
My first step was connecting the Neopixel strip to the Arduino. Although I don’t remember the exact wiring, I used digital pin 6 for the data input, which was declared in the code. I also followed best practices by referencing the Adafruit NeoPixel library, which I installed through the Arduino IDE. My strip didn’t have an external power source—it was powered through USB—but ideally it should use a separate 5V supply with a resistor between data and ground and a capacitor for stability (as noted in the Adafruit comments in the code).
The actual light patterns were mostly static arrangements of colored pixels, with some attempts at animation. I created segments of the strip to light up in specific colors to represent key parts of the Devil May Cry vibe, such as:
White pixels in the center symbolized Dante’s white hair.
Red and orange pulses represented demons and infernal energy.
Purple and blue tones showed up toward the end as a reference to the dark, mysterious visual style of the show’s supernatural scenes.
Here’s a short excerpt from the code I used to build the display:
strip.setPixelColor(6, strip.Color(255,255,255)); // Dante's white hair strip.setPixelColor(2, strip.Color(255,0,0)); // Demons in red strip.setPixelColor(9, strip.Color(255,80,0)); // Flames and fire aura strip.setPixelColor(16, strip.Color(40,0,255)); // Purple dark energy
The show ran in a loop with timed delays between lighting effects, but the biggest challenge for me was trying to create movement—I didn’t understand how to animate the light so it would travel along the strip (like a chase or wave). I could get the colors to appear, but making them shift or scroll smoothly was hard. I started experimenting with the built-in colorWipe() and rainbow() functions in the NeoPixel library but didn’t fully figure out how to get those effects working the way I wanted. That said, the strip still visually communicated the mood and palette of the show effectively.
One thing I did learn and really appreciated was how powerful LEDs are as a storytelling tool. This lab reminded me of concert lighting, club visuals, or even stadium effects—where every flash or hue change can set a vibe. By translating a visual style from animation into code, I started to think of art not just as something you look at, but something you can experience in light and rhythm.
This lab pushed me to think about coding and creative interpretation differently. Even though I didn’t fully master animation, I walked away knowing how to solder and program a Neopixel strip, how to analyze color in a more intentional way, and how to turn art into light. Unfortunately, I was unable to get a photo of my LED illustration. And although my Devil May Cry inspired Neopixel show wasn’t perfect, but it was expressive, dramatic, and lit up like something straight out of the anime itself.
0 notes
t2yper · 2 months ago
Text
Lab 6: Soldering
For this lab, the objective was to learn and demonstrate how to repair cut wires by soldering two segments back together and insulating the connection with heat shrink tubing. I repeated this process three times using a 12-inch piece of stranded wire.
Tumblr media Tumblr media Tumblr media
To begin, I cut the wire into sections and stripped the waxy insulation off the ends to expose the metal underneath. I did this for all three segments I planned to repair. Once the ends were stripped, I lined the wire tips up and twisted them together to prep for soldering. This step turned out to be slightly more difficult than I expected—getting the wires to align perfectly and hold their shape required patience and a steady hand. But once I got them to sit right, I used the soldering iron to carefully melt the solder onto the twisted connection, bonding the wires back together securely.
Tumblr media Tumblr media Tumblr media
After soldering each connection, I slid a piece of heat shrink tubing over the repaired area and used a lighter to gently shrink the tubing down. This helped fully insulate the joints and made each repair look clean and professional.
Through this lab, I learned how to properly solder for the first time, which I think is a really useful skill to have—especially as someone interested in building functional hardware-based projects. Knowing how to fix or create electrical connections opens up a lot of creative possibilities. Even though aligning the wires was a bit of a challenge, it felt good to finish with solid, insulated connections that worked.
This was a simple but satisfying lab. It taught me a foundational skill that I can carry forward into more complex builds, whether I’m prototyping controllers, repairing broken circuits, or integrating sensors into future interactive projects.
0 notes
t2yper · 2 months ago
Text
HW 2: Deep Diver - The Enclosure 🐠
For my midterm physical computing project, I used photoresistors as a game controller to control a fish character inside a P5.js-based video game. By covering or uncovering the sensors, the fish swims up, down, left, or right depending on which direction is triggered. Since the game was aquatic-themed, I wanted to design an enclosure that matched the environment and enhanced the interaction. That’s how I came up with Deep Dover, a controller enclosure styled after a fish tank that would serve as both a protective shell and a visual element to support the game’s narrative.
Tumblr media Tumblr media
I started the process by designing a custom acrylic case using MakerCase and laser-cutting it in the Spelman Innovation Lab. I chose a translucent blue acrylic to reflect the water aesthetic and designed the dimensions to be roughly 5 x 7 x 5 inches—just big enough to hold the Arduino Uno, breadboard, and sensors comfortably. The top half of the enclosure was built from this laser-cut acrylic, while the bottom half was a found plastic container that I cleaned thoroughly. I filled the container with water and tinted it using blue ink, then added handmade Play-Doh rocks to simulate the feel of a real aquarium. Once I had both parts ready, I hot-glued the acrylic case together and mounted it on top of the container to complete the enclosure.
To integrate the electronics, I drilled holes in the acrylic for both photoresistors and the USB cable that powers the Arduino. I then disassembled my controller setup temporarily and mounted the Arduino on the bottom shelf inside the box and the breadboard above it. Once the core components were fixed in place, I fed the two light sensors through the pre-drilled holes, aligning them so users could interact with the sensors directly from the outside. The sensors worked well within the design and were easy to access without interfering with gameplay. Placement was especially important to ensure that the photoresistors were responsive to ambient light changes and player interaction.
Tumblr media Tumblr media Tumblr media
There were definitely some challenges throughout this process. Making sure the enclosure was the right size to hold everything without being overly bulky required a few adjustments during assembly. Fitting the Arduino and breadboard into the limited space inside the case was also a bit difficult, and I had to be cautious not to tangle or overstress the wiring. The biggest risk I took was incorporating water into the design—something I probably won’t do again unless I have more advanced waterproofing methods available. That said, I was extremely careful with sealing, and nothing got wet. I think the result was not only practical but genuinely cute, and I was proud of how I merged functionality with a strong visual theme.
Seeing the final project come together made me realize how valuable enclosure design is—not just for aesthetic purposes but also to protect the hardware, organize components, and create an immersive experience for the user. I enjoyed being able to incorporate my artistic interests in design and storytelling into a technical assignment, which made this one of the more rewarding projects I've worked on this semester. If I were to do this again, I might explore other materials, add LED lighting for more atmosphere, or integrate sound elements to give the enclosure even more personality.
Overall, building Deep Dover helped me grow as both a designer and a developer. I got to test my creative problem-solving skills, explore sensor integration in a hands-on way, and create something that felt like a real fusion of code, electronics, and art. Even with the risks, the build turned out well, and it taught me that when you take the time to design an enclosure thoughtfully, it can truly bring your whole project to life.
0 notes
t2yper · 2 months ago
Text
Lab 7: Deep Diver - The Game
Midterm Project
For my midterm project, I designed a custom video game controller using photoresistors (light sensors) to control a fish character in a P5.js sketch. The player moves their fish character through an aquatic environment by interacting with sensors housed in a controller shaped like a mini fish tank. The fish swims up, down, left, or right depending on how the player manipulates light over the sensors. The goal was to explore playful and tactile input methods that might appeal to kids—imagine a simplified aquarium game installed at a place like the Georgia Aquarium.
I chose photoresistors because they respond dynamically to ambient light levels, making them a fun and mechanically intuitive for controlling movement. Unlike traditional buttons or joysticks, photoresistors allow for soft, indirect interaction: covering or uncovering them changes the light input, triggering movement. One sensor was used to control vertical movement (up/down), and the other handled horizontal movement (left/right). Since the lighting varies by environment, I had to consistently tweak the threshold values, which made the game more sensitive and responsive to different conditions.
Tumblr media
The physical controller was inspired by a fish tank. I combined a laser-cut acrylic box (designed using MakerCase) with a found plastic container filled with water to complete the aquatic illusion. Inside the enclosure, I installed an Arduino Uno, breadboard, jumper wires, and two light sensors. The setup was minimal but effective and ergonomic—players simply place their hand over the sensors to interact.
Tumblr media
Code for Arduino:
int sensorValue = 0; int sensorValue2 = 0; int sensorPin = A2; int sensorPin2 = A5; void setup() { pinMode(sensorPin, INPUT); pinMode(sensorPin2, INPUT); Serial.begin(19200); } void loop() { sensorValue = analogRead(sensorPin); sensorValue2 = analogRead(sensorPin2); Serial.print(sensorValue); Serial.print(","); Serial.println(sensorValue2); delay(100); }
This code reads the values from two analog photoresistors and transmits the values over serial as comma-separated strings.
Snippet of Code for P5.js (sourced from P5.js serila monitor- darwin ver.)
// Extracts sensor values and moves fish if (dataArray.length == 2) { let sensorValue1 = int(dataArray[0]); let sensorValue2 = int(dataArray[1]); // Thresholds for motion based on ambient light let thresholdLow1 = 40; let thresholdHigh1 = 41; let thresholdLow2 = 28; let thresholdHigh2 = 30; if (sensorValue1 < thresholdLow1) y -= 2; else if (sensorValue1 > thresholdHigh1) y += 2; if (sensorValue2 < thresholdLow2) x -= 2; else if (sensorValue2 > thresholdHigh2) x += 2; }
Tumblr media
I used serial communication to transmit data from Arduino to P5.js using the p5.serialcontrol app. Data is sent as a comma-separated string in the format "value1,value2\n". In P5.js, serial.readLine() is used to receive and parse this input. I implemented basic error handling by checking if the data string is valid before processing.
SideNote: One technical quirk was that the Arduino IDE and P5 Serial Control app can’t run simultaneously—so switching between them had to be done carefully.
Some User Instructions
Make sure you're in a decently lit area.
Plug in Arduino via USB.
Open the P5.js sketch and launch the game.
Cover or uncover each light sensor:
Sensor 1: Up/Down movement of the fish
Sensor 2: Left/Right movement
Watch the fish respond in real-time to changes in light exposure.
Project before the enclosure.
Tumblr media Tumblr media
Project inside inclosure.
Some challenges that I faced during this project were lighting, serial control communication and understanding what logic to put into the sketch. Lighting conditions varied across different spaces, making consistent thresholds tricky. I solved this by testing and adjusting the threshold ranges based on ambient light in each workspace. Secondly, the serial port couldn’t be accessed by both the Arduino IDE and the P5 Serial Control app at the same time. I learned to only open one at a time and work step-by-step. At the start, understanding how small light changes affected input took experimentation. I used Claude AI to help brainstorm threshold logic for better control response.
I definitely could see this project going somewhere further, especially considering how cute the enclosure came out! I would likely add collectible items like glowing fish or light orbs inside the water part of the enclosure to make the game more interactive. I hope to build a more durable controller box with better water-proofing. Since my comfort is on Unity, I would also expand this concept into Unity, possibly using the same sensors via serial input to create a more advanced aquatic game and include some sound assets as well as other aspects to the game like a point system.
I would absolutely pitch this as a game to be played at the Georgia Aquarium for kids!
Participating in this project taught me how to bridge physical computing and digital interaction through serial communication and custom controller design. As someone interested in game development, animation, and interactive art, this felt like a pretty natural extension of my interdisciplinary practice, despite its challenges. I enjoyed learning how to think about sensors not just as tools, but as storytelling devices that can create new, embodied gameplay experiences. And honestly, I learned how fun—and powerful—it is to invent your own way to play.
0 notes
t2yper · 4 months ago
Text
Lab 5: Arduino and P5.js :)
The objective of this lab was to establish serial communication between an Arduino and a P5.js sketch using the P5.SerialControl library. The goal was to read analog input from a potentiometer (or other sensor) and use this data to manipulate a sound parameter in P5.js. This experiment introduces the concept of serial communication and demonstrates how real-world input can create interactive experiences in a digital environment. The materials used were Arduino Uno Hardware , Breadboard, Jumper wires, Potentiometer (10kΩ) Arduino IDE software & P5.js web editor and installed P5.SerialControl library for P5.js (Darwin version).
Descriptive Circuit Overview:
As said above, the circuit consisted of an Arduino Uno, a 10kΩ potentiometer, and a serial connection to a P5.js sketch. The potentiometer is wired with:
The Potentiometer placed in the middle of the bread board.
Ground and power wires connected across the bottom edge of the breadboard.
The middle pin connected to A1 (analog input pin on the Arduino).
One outer pin connected to 5V power in the Arduino.
The other outer pin connected to ground (GND) in the Arduino.
This setup allows the potentiometer to function as a voltage divider. When the potentiometer is turned, the resistance changes, changing the voltage received by the Arduino’s analog input pin. The Arduino was able to read this voltage using the analogRead() command, converted it into a numerical value (range: 0 to 1023), and sent this data to the P5.js sketch over the serial communicator (P5.js Serial.Control).
Schematic:
Tumblr media
Code Explanation Overview-Arduino:
The Arduino code initializes one analog pin, A1, to read input from the potentiometer. The values are then sent via the Serial.print() function in a comma-separated format, allowing P5.js to parse them correctly.
Pin Setup: The potentiometer’s pin is set as an input using pinMode(sensorPin, INPUT).
Analog Reading: The values A1 are continuously read using analogRead(sensorPin).
Serial Communication: The values are sent over the serial port using Serial.println(sensorValue);. The comma serves as a delimiter to separate multiple values.
This ensures that the final P5.js sketch can properly interpret and map the incoming data, which would be displayed in the serial console/monitor of the Arduino Uno, Serial Controller, and P5.js web editor console. In other words, the serial controller allows the code to be communicated from the Arduino software to the P5.js. The code is below:
int sensorValue = 0;
int sensorPin = A1;
void setup() {
// put your setup code here, to run once:
pinMode(sensorPin, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
}
Code Explanation Overview-P5.js:
The P5.js sketch establishes serial communication with the Arduino and reads the sensor data to control a visual representation through the resistance of the potentiometer.
Serial Communication Setup: The script initializes a serial connection using serial = new p5.SerialPort();, lists available ports, and attempts to open the correct one.
Data Reception: The function serial.on('data', gotData); listens for incoming serial data and stores it in a variable.
Data to Visuals: The sensor values are used to control the size of a circle on the canvas (circle(20,20,latestData);) in function draw().
Display of Values: The latest received data is displayed on the screen using text(latestData, 10, 10).
The code is below:
let serial; let latestData = "waiting for data";
function setup() { createCanvas(windowWidth, windowHeight);
serial = new p5.SerialPort();
serial.list(); serial.open('/dev/tty.usbmodem1301');
serial.on('connected', serverConnected);
serial.on('list', gotList);
serial.on('data', gotData);
serial.on('error', gotError);
serial.on('open', gotOpen);
serial.on('close', gotClose); }
function serverConnected() { print("Connected to Server"); }
function gotList(thelist) { print("List of Serial Ports:");
for (let i = 0; i < thelist.length; i++) { print(i + " " + thelist[i]); } }
function gotOpen() { print("Serial Port is Open"); }
function gotClose(){ print("Serial Port is Closed"); latestData = "Serial Port is Closed"; }
function gotError(theerror) { print(theerror); }
function gotData() { let currentString = serial.readLine(); trim(currentString); if (!currentString) return; console.log(currentString); latestData = currentString;
}
function draw() { background(255,255,latestData); fill(0,0,0); text(latestData, 10, 10);
fill(5,200,5); circle (20, 20 latestData);
// Polling method /* if (serial.available() > 0) { let data = serial.read(); ellipse(50,50,data,data); } */ }
Lastly, into the P5.js helm library file of the sketch, we put this P5.js Port Control Script link library in it as well:
<script language="javascript" type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.serialport.js"></script>
Observations/Analysis:
When manipulating the potentiometer, the values ranged from 0 to 1023 (Arduino’s 10-bit ADC resolution). These values were mapped in P5.js to control the size of the circle in real-time, and went further to change the background color as well. The movement of the shape corresponded smoothly to changes in sensor input, proving the effectiveness of serial communication.
If we had applied the data to sound manipulation, the potentiometer’s values could have been mapped to control frequency, volume, or panning. The map() function would be used to scale the 0-1023 range into an appropriate audio parameter range in P5.js.
A demo video of the outcome is below:
Challenges and Troubleshooting:
Some challenges encountered included:
Serial Port Connection Issues: Initially, P5.js could not detect the correct serial port. This was resolved by having manually specifying the port (serial.open('/dev/tty.usbmodem1301');) in the script. This required a lot of troubleshooting code and hardware at first.
Conclusion:
This lab demonstrated how Arduino and P5.js can communicate through serial data, allowing physical input to control digital outputs. The way. that the potentiometer was able to change the size of the circle, isthe same way it can be used to turn vilume up and down on a device. Understanding serial communication opens up possibilities for interactive installations, such as motion-sensitive visuals or audio-controlled audio experiences. This aspect introduces new ways to map sensor input to audio-visual feedback, an essential skill in creative coding and physical computing.
In the future, this technique could be expanded by integrating multiple sensors and including the synthesis of sound assets to creat an immersive experience.
...Or it could be used in part to make a DIY iPod.
xx
0 notes
t2yper · 4 months ago
Text
We Say What Black This Is -Amanda Williams
This past week, the Spelman College Museum of Fine Art opened its doors to the public for the unveiling of We Say What Black This Is, curated by Curator-in-Residence Karen Comer Lowe. The exhibition is embodied by the bold and conceptual work of Amanda Williams, a Chicago-based artist whose practice engages in conversation with pieces from the Atlanta University Center Collection as well as works within the Spelman Museum’s holdings.
Throughout the walk-through, we were able to experience the stunning range of works Williams created during the year 2020. And let’s be real—2020 wasn’t just any year. It was a defining moment, not just for the United States but for the world. Williams takes this era of unrest, uncertainty, and transformation and distills it into her visual language, using abstraction, color, and materiality to question: What kind of Black does America say matters?
From small 6” x 6” watercolor pieces designed to mimic the frame of an Instagram post to commanding 60” x 60” canvases layered with rubble textures and experimental pours, Williams’ work demands that we see Blackness in all its depth—not just in its brilliance, but in its fragility, its contradictions, and its undeniable presence.
During a gallery walkthrough, Williams expressed that this exhibition was curated with the identities of the AUC community in mind. As students at some of the most historic and prestigious Historically Black Colleges and Universities, we know what it means to exist under the weight of the highest expectation—whether from peers, professors, or even those outside our gates who scrutinize Black ambition with both admiration and doubt.
But Williams isn’t just interested in “Black excellence.” Her work reaches for something beyond the curated perfection we are so often expected to embody. It offers an exclusive glimpse into the messy, the overlooked, the complexities and paradoxes that both make and break Black American society. Because Blackness is not monolithic, and our identities cannot be reduced to simplistic narratives of struggle or success.
This series isn’t about whether your school bookstore stocks the right hair products or whether you’re Team Drums or Team Flats (though, let’s be honest, these conversations are important). What this series does is ignite the flickers of something deeper—the fire that fuels the Black community, transcending university, age, skin tone, hometown, and background.
And with that fire, maybe we can organize. Maybe we can look inward and to each other, not just as individuals but as a collective force. Maybe, just maybe, if we do that, we can finally start to look beyond ourselves.
Because if we don’t, how can we say we are taking the chance to truly change the world?
I encourage all who are able to fully engage with this exhibition, alongside the one currently on view at the Clark Atlanta University Museum of Art. These are conversations worth having, worth continuing, and worth amplifying.
For information on how to view this exhibition visit the Spelman College Museum of Fine Art web page.
xx tbn
0 notes
t2yper · 4 months ago
Text
Week 3 Lab (2/6) Blink
The goal of this lab is to understand how Digital Outputs work and how to create them. using Arduino hardware. By constructing a simple circuit and uploading pre-created code via the Arduino IDE, we will control an LED to blink at a set interval.
Description of Circuit and Creation:
This circuit consists of an LED connected to a digital pin on the Arduino, along with a 220 Ohm resistor to limit current flow and prevent damage to the LED. The Arduino sends a HIGH (5V) signal to turn the LED on and a LOW (0V) signal to turn it off, creating a blinking effect.
The long leg (anode) of the LED is connected to digital pin 13 on the Arduino.
The short leg (cathode) of the LED is connected to one end of a 220Ω resistor.
The other end of the resistor is connected to GND (ground) on the Arduino.
The Arduino is powered via USB or an external power supply.
Explaining the Code:
Observations:
After uploading the code to the Arduino Uno, the LED started blinking on and off at a 1-second interval, confirming the correct operation of digital outputs.
Increasing or decreasing the delay() values changed the speed of the blinking.
If the LED did not blink, checking wiring connections and ensuring the resistor was properly placed helped troubleshoot the issue.
This experiment demonstrates how digital signals work, where an Arduino can control an LED using simple HIGH/LOW commands.
Q&A
1. What is an Arduino IDE?
The Arduino IDE (Integrated Development Environment) is the software used to write, compile, and upload code to an Arduino microcontroller. It allows a simple interface for programming and testing electronic projects paired with Arduino hardware.
2. What is a Digital Input?
A Digital Input is a signal received by the Arduino that can be either HIGH (1) or LOW (0). Examples include buttons, sensors, and switches that provide ON/OFF signals.
3. What is a Digital Output?
A Digital Output is a signal sent from the Arduino to control external components, such as LEDs, buzzers, and motors. In this experiment, the LED is controlled using digitalWrite() to turn it ON or OFF.
4. What are Microcontroller Pins?
Microcontroller Pins are physical connection points on an Arduino board that allow it to interact with sensors, actuators, and other devices. They can be input pins (reading data) or output pins (sending signals).
5. What does pinMode() do?
The pinMode() function sets up an Arduino pin as INPUT or OUTPUT. In this lab, pinMode(ledPin, OUTPUT); tells the Arduino to use pin 13 to send signals to the LED.
6. What does digitalWrite() do?
The digitalWrite() function sends a HIGH (5V) or LOW (0V) signal to a digital pin. In this experiment, it controls the LED's ON/OFF states.
7. What does delay() do?
The delay() function pauses the execution of the code for a specific amount of time, measured in milliseconds. In this experiment, delay(1000); causes a 1-second delay between turning the LED ON and OFF.
Challenges/Trouble-Shooting:
The only challenge I faced during this lab was my adapter was not the correct kind to transfer the software into the hardware in order to make the LED work properly. This was fixed by changing the adapter used to connect the Arduino board to the hardware.
In conclusion, this project successfully demonstrated how to use digital outputs in Arduino to control an LED. By setting up a simple circuit and writing code, we learned how to use pinMode() to configure pins, digitalWrite() to send signals, and delay() to control timing.This helped me understand how microcontrollers interact with physical components.
Below is a schematic and demo video of the lab:
xx
Tumblr media
1 note · View note
t2yper · 4 months ago
Text
Analog Inputs (Potentiometers)
This week's report is rather complex. We learned about Potentiometers, which are resistors that allow you to manually adjust the resistance by twisting it. These are often used for daily items like car steering wheels, dim lights, radios and more. This particular lab explores how a potentiometer can be used to control the color transitions of an RGB (red, green,blue) LED by adjusting the intensity of red, green, and blue components. The potentiometer serves as a variable resistor, generating an analog voltage that the Arduino reads to determine LED brightness levels. By mapping the potentiometer's values to a range suitable for Pulse Width Modulation (PWM), we can smoothly transition between colors. This process involves reading an analog input and applying it to digital PWM outputs to manipulate LED brightness.
Description of Circuit:
The circuit consists of an Arduino Uno, a potentiometer, an RGB LED, wires of choice and 270 Ohm resistors. The potentiometer is connected with one terminal to 5V, another to GND, and the middle pin to analog pin A3 on the Arduino. This setup allows the potentiometer to function as a voltage divider, providing an adjustable voltage to the Arduino's analog input. The RGB LED is connected to three Pulse Width Modulation digital pins (9, 10, and 11) through the 270 Ohm resistor to control the intensity of its red, green, and blue components.
When the potentiometer is adjusted, the Arduino reads its voltage level and maps it to a corresponding LED brightness. The potentiometer's full range (0-1023) is divided into three equal segments, each controlling a different color transition:
0-340: Red fades out while Green fades in.
341-681: Green fades out while Blue fades in.
682-1023: Blue fades out while Red fades in.
Explaining the Code:
This code starts by defining the necessary variables: potPin for the potentiometer's input, redPin, grnPin, and bluPin for the LED outputs, and potVal to store the potentiometer's reading. The setup() function initializes the RGB LED pins as outputs, allowing them to receive PWM signals from the Arduino.
Inside the loop(), the potentiometer value is read using analogRead(potPin), returning a value between 0 and 1023. Based on this value, the program determines which third of the range the potentiometer falls into and calculates corresponding brightness levels for the LEDs. Since the PWM function analogWrite() only accepts values between 0 and 255, a scaling factor is applied to convert the potentiometer reading appropriately.
In the first third of the range (0-340), the red LED fades out while the green LED fades in, and the blue LED remains off. This is achieved by scaling the potentiometer value, subtracting it from 256 for red, and applying it directly to green. When the potentiometer moves into the second range (341-681), green begins to fade out, while blue fades in, with red staying off. Similarly, in the final range (682-1023), blue fades out while red fades back in, completing the color cycle.
After calculating the brightness values, analogWrite() sends the appropriate PWM signals to the RGB LED pins, controlling their brightness dynamically. This results in a smooth, cyclic cross-fading effect as the potentiometer is turned.
The code is attached below:
/* Code for making one potentiometer control 3 LEDs, red, grn and blu, or one tri-color LED
* The program cross-fades from red to grn, grn to blu, and blu to red
* Clay Shirky <[email protected]>
*/
// INPUT: Potentiometer should be connected to 5V and GND
int potPin = A3; // Potentiometer output connected to analog pin 3
int potVal = 0; // Variable to store the input from the potentiometer
// OUTPUT: Use digital pins 9-11, the Pulse-width Modulation (PWM) pins
// LED's cathodes should be connected to digital GND
int redPin = 9; // Red LED, connected to digital pin 9
int grnPin = 10; // Green LED, connected to digital pin 10
int bluPin = 11; // Blue LED, connected to digital pin 11
// Program variables
int redVal = 0; // Variables to store the values to send to the pins
int grnVal = 0;
int bluVal = 0;
void setup()
{
pinMode(redPin, OUTPUT); // sets the pins as output
pinMode(grnPin, OUTPUT);
pinMode(bluPin, OUTPUT);
}
// Main program
void loop()
{
potVal = analogRead(potPin); // read the potentiometer value at the input pin
if (potVal < 341) // Lowest third of the potentiometer's range (0-340)
{
potVal = (potVal * 3) / 4; // Normalize to 0-255
redVal = 256 - potVal; // Red from full to off
grnVal = potVal; // Green from off to full
bluVal = 1; // Blue off
}
else if (potVal < 682) // Middle third of potentiometer's range (341-681)
{
potVal = ( (potVal-341) * 3) / 4; // Normalize to 0-255
redVal = 1; // Red off
grnVal = 256 - potVal; // Green from full to off
bluVal = potVal; // Blue from off to full
}
else // Upper third of potentiometer"s range (682-1023)
{
potVal = ( (potVal-683) * 3) / 4; // Normalize to 0-255
redVal = potVal; // Red from off to full
grnVal = 1; // Green off
bluVal = 256 - potVal; // Blue from full to off
}
analogWrite(redPin, redVal); // Write values to LED pins
analogWrite(grnPin, grnVal);
analogWrite(bluPin, bluVal);
}
Observations and Trouble-Shooting:
While testing the circuit, I saw that as the potentiometer was rotated, the LED gradually changed colors from red → green → blue → red in a seamless transition. The brightness levels changed proportionally to the potentiometer's position, demonstrating the correct application of analogRead() and analogWrite(). The range of values read from the potentiometer was 0-1023, which was successfully converted to 0-255 for PWM control.
This happens because the potentiometer varies resistance, which in turn affects the voltage applied to the analog pin. Since analogRead() interprets voltage levels and converts them to a 0-1023 scale, the program uses simple scaling calculations to ensure proper brightness control. The LED brightness is directly proportional to the potentiometer’s position within each range.
During setup and testing, I encountered a few issues:
Inconsistent LED Brightness: Initially, the LED brightness was very low because of the typeof resistor that I used. It was quickly fixed because I changed it to the correct 270 Ohm resistor.
RGB LED Not Responding: While building the circuit, I put the the power and ground wires in the wrong side of the breadboard. This created a blockage in the electricity flow.
In conclusion, this lab exampled how potentiometers can be used as analog controllers for electronic components. By varying resistance, the potentiometer influences the voltage input, which can be read by the Arduino to determine output behavior. The experiment also highlighted the importance of PWM in LED control, allowing for smooth brightness adjustments rather than simple ON/OFF states.
Additionally, breaking the potentiometer’s range into three distinct sections provided a structured way to control multi-color transitions, offering insight into mapping analog inputs to digital outputs. This method is widely used in interactive systems, such as lighting effects, user input controls, and sensor-based applications. This similarly mimics parallel circuits.
Below is the video demonstration and the schematic:
Tumblr media
xx!
0 notes
t2yper · 5 months ago
Text
Class 2/4
Today in class we learned about Parallel and Series Circuits. In the video above, is a Series Circuit. Please see other post for a demo of the Parallel Circuit. What happens here is that, the current flows in a straight line. In the lab demo above, that shows as the current going from the power source(laptop) to ground. In between are 2 forms of resistance -- a resistor, 2 tick buttons, and one light emitting diode(LED). Here, we connected our power source to the Arduino , which also gets connected to the breadboard via the black and red wires. From there, we made sure both sides of the bread board were also connected by red and black wires--the red being power(positive) and the black being ground(negative). From power, we connect a resistor (wire with brown bead with stripes) onto the breadboard where the tick buttons are and the LED will be ( just like the parallel circuit).
The difference here is that instead of having to use wires to connect both ends of the tick buttons, we only have to connect one end of each tick button( with the small orange wire) to each other--allowing current to flow straight through both buttons simultaneously. After this, we connect the buttons to the LED (with the small red wire) and then connect the LED, with the blue wire, to ground (negative).
This is kind of circuit allows a straight path a current to flow, however voltage is not evenly distributed amongst forms of resistance—-which means in order for the light to show, you have to press both buttons simultaneously.
You can also view the schematic for this kind of circuit.
xx
Tumblr media
0 notes
t2yper · 5 months ago
Text
Class 2/4
Class 2/4 (Parallel Circuit)
In pair with the series circuit, we also created a parallel circuit., this allowed us to see how these kinds of circuits work and what they do. Here, we connected our power source to the Arduino , which also gets connected to the breadboard via the black and red wires. From there, we made sure both sides of the bread board were also connected by red and black wires--the red being power(positive) and the black being ground(negative). From power, we connect a resistor (wire with brown bead with stripes) onto the breadboard where the tick buttons are and the LED will be. From there, we have to use wires to connect the one end of each button to the terminal of the resistor because this is how the button can become apart of the circuit. This was done with the small yellow wire and the large yellow wire. From this, we use a purple wire and another small yellow wire to connect the other ends of the buttons to the LED. Lastly, we used a small blue wire to connect the LED to the ground (negative) to complete the circuit.
This kind of cuirt allows even distrubituon of volatge/ Ohms to east formof resistance. In this care, it was the buttons, and the LED. What this results in, is both buttons can individually turn on the LED when pressed down.
This is a parallel circuit! You can also see the schematic for added context.
xx
Tumblr media
0 notes
t2yper · 5 months ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Class 2/4
For this task, we were tasked with coming up with a physical computing pitch idea that could be used for an interactive experience at the Spelman College Museum of Fine Art. After some brainstorming (and some really questionable ideas), I landed on something that felt both meaningful and innovative—a virtual voting experience. I wanted this to be something that could be an immersive exhibit but also something that could be used beyond the museum for the betterment of society.
The idea is pretty simple: users step into a VR environment that simulates the process of voting. But this isn’t just about checking boxes on a digital ballot. It’s about feeling the weight of the vote—understanding that this is a right that people fought, bled, and died for, especially Black Americans. Through interactive storytelling, participants will not only engage with the mechanics of voting but also experience the historical barriers that made access to the ballot so crucial. The goal? To make people think twice about ever skipping an election again.
Why did I choose voting? Because it’s something so many of us take for granted, yet millions across the world don’t have the privilege. And because, let’s be real—voting, especially in a digital age, should feel just as accessible and engaging as anything else we do online. Finally, there is just so much to vote for in this world, and so much we should know about concerning who/what we give our vote to.
So, what if casting a ballot felt as intuitive as scrolling on your phone? What if it could be integrated with platforms like Google Forms or official election forums? What if it actually felt powerful? Genius, right?
Bringing this concept into a museum setting, especially at Spelman, makes even more sense when thinking about how Black history and activism are deeply intertwined with the right to vote. Framing this project around Black History Month makes it not just an interactive installation but a reminder of how far we’ve come and how much further we still have to go.
I’ll be refining this idea more as I go, adding interactive elements and refining the UX (because nobody likes a clunky virtual experience, haha). But for now, I’m pretty excited about where this is headed.
0 notes
t2yper · 5 months ago
Text
Class 1/23
Today in class, we were tasked with coming up with a physical computing idea that utilizes the Makey-Makey boards. If don't know what a Makey-Makey is, thats reasonable. Most people don't, however now you do. A Makey-Makey is a design kit that allows users to use everyday, mundane objects as computer keys such as the arrows and space keys. You can use anything from bananas to people as controllers to play a computer game. In a way, you can thin of it as hot-wiring your computer, haha.
Anyhow, the idea my partner and I came up with was an athletic glove, where the sensors connected to the Makey-Makey would be inside the hand of the glove. The sensors would pick up heart rate and analyze it to decipher hydration levels, metabolic rate, lactic acid build up and more. We modeled a prototype with and outline and play-doh and...a Makey-Makey board. through the Makey-Makey, one would be able to receive information through sensors on what their body is doing during any physical activity. It would be mostly used for gym sharks, athletes, muscle heads, anyone that cares about that kind of stuff. It would also be the kind of glove that you can wear comfortable on a cold run or lifting weights. it keeps track of these levels in order to notify you when you should take a break or stretch or really anything. The sensors would be connected via bluetooth to your phone or apple watch for convenience.
Stay tuned for more ideas, but don't steal 'em!
xx
1 note · View note