<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Navya Batra on Medium]]></title>
        <description><![CDATA[Stories by Navya Batra on Medium]]></description>
        <link>https://medium.com/@navya_batra?source=rss-ce574eab1963------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Tn21FmPTuG_GRsRq</url>
            <title>Stories by Navya Batra on Medium</title>
            <link>https://medium.com/@navya_batra?source=rss-ce574eab1963------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 17:01:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@navya_batra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lab 6- Optical Illusion with DC Motors]]></title>
            <link>https://medium.com/@navya_batra/lab-6-optical-illusion-with-dc-motors-3d7aaadf36b3?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d7aaadf36b3</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 08:42:11 GMT</pubDate>
            <atom:updated>2026-10-19T08:42:57.159Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lab 6- Benham’s Top: Optical Illusion with DC Motors</h3><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FfDbCkp68IfM%3Ffeature%3Dshare&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfDbCkp68IfM%3Ffeature%3Doembed" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8934e215baac85ae3d757308a6cd1cf9/href">https://medium.com/media/8934e215baac85ae3d757308a6cd1cf9/href</a></iframe><h3>Description</h3><p>In this lab, the assignment was to utilize a DC motor as a form of output through vibration or visuals. I actually explored both. Settling on the visual of an optical illusion. In a previous lab, I explored vibrating water with a piezo. I brought this problem to a different professor, who suggested I try with a DC motor to vibrate my container. I finally didn’t pursue this. I used a hot glue attachment on the top of the motor head to create inbalance, then flushed it against a container filled with water. Instead of creating the sound like patterns and ripples I was going for, this shook the container. Creating a visual effect I wasn’t extremely happy with. So, I created this little disk that follows the logic of Benham’s top for an optical illusion instead.</p><h3>Logic</h3><pre>const int potPin = A0;<br>const int motorPin = 9;<br><br>void setup() {<br>  pinMode(motorPin, OUTPUT);<br>  Serial.begin(9600);<br>}<br><br>void loop() {<br>  int potValue = analogRead(potPin);              // 0–1023<br>  int speed = map(potValue, 0, 1023, 0, 255);     // PWM range<br>  analogWrite(motorPin, speed);<br>  Serial.println(speed);                          // check in Serial Monitor<br>  delay(10);<br>}</pre><p>Very simple code. Reading input from the potentiometer and writing it to my motor pin as output (pin ~9).</p><h3>Process</h3><p><em>Materials</em></p><ul><li>Arduino</li><li>Breadboard</li><li>Wires</li><li>Potentiometer</li><li>DC Motor</li><li>Diode</li><li>Transistor</li><li>1k Resistor</li><li>9V Battery</li><li>Paint</li><li>Disk</li></ul><p>After realizing the motor did not give me the effect I was looking for, I transfered over to trying to do an optical illusion instead. I defaulted to Benham’s top, in an effort to create the colors through just black and white. Unfortunately, it appears to look more of a spiral, but was still fun:)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqN5zgOBTydNq4sz3_HbSA.jpeg" /><figcaption>Circuit and Final Image</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d7aaadf36b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thoughtless Actions Human-Centered Design]]></title>
            <link>https://medium.com/@navya_batra/thoughtless-actions-human-centered-design-3c1ee44c99b2?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c1ee44c99b2</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 23:57:50 GMT</pubDate>
            <atom:updated>2026-10-17T23:57:50.536Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Prompt: </em></strong><em>For this exercise, we looked at a set of “Thoughtless Acts” images, small everyday moments where people adapt objects to make up for something missing or poorly designed. For each one, we observed what was happening and why, then brainstormed design opportunities based on the patterns we noticed. Finally, I picked the strongest idea, walked through the observation process behind it, and connected the human-centered design approach to our midterm project.</em></p><p><strong><em>Team: </em></strong><em>Navya Batra</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBzso1pECSxJoYvvEqMpZQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_7FOVQgqKI7BXDodd_CWA.jpeg" /></figure><p><strong>Left Picture<br>Step 1:<br></strong>What do I see: napkin in boot.<br>Why is it placed here: convenience. Not enough hands to hold things (sandwich and plate both)<br>What are they doing: eating<br>What’s missing: some sort of utensil or plate that has a makeshift napkin in it?<br><strong>Step 2:<br></strong>What opportunities do you see: something where u can easily wipe ur hands and mouth with a detachable item on ur plate itself (cuz its still an eating tool)</p><p><strong>Right Picture<br>Step 1:<br></strong>What do I see: plastic bag tied to wire basket<br>Why is it placed here: convenience. Hands r full or busy (pushing/carrying stuff) so the bag needs to stay put on its own. The polythene is thin enough that it can be wrapped and tied around. Easily quick solution<br>What are they doing: probably moving. Don’t want it to fly away<br>What’s missing: some built in way to secure loose bags/items to the basket. no hook or clip so the bag itself becomes the tie<br><strong>Step 2:<br></strong>What opportunities do you see: baskets/carts that have a built in way to secure loose stuff. like a clip or strap or little hook so ur bag doesnt have to be tied in a knot every time, ppl use whatever’s flexible + already there (bag handles, wire gaps) as a tie.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clR2RVFhGTbKDZVqih1AzQ.jpeg" /></figure><p><strong>Left Picture<br>Step 1:</strong> <br>What do I see: scarves hanging on hangars<br>Why is it placed here: closet space/drawers prob full. scarves get wrinkly or tangled if u fold them in a pile so hanging is easier. also u can see all of them at once<br>What are they doing: storing + displaying them. picking out an outfit<br>What’s missing: an actual scarf organizer? hangers r made for shirts not long skinny fabric so they’re kinda doubling up / sliding off<br><strong>Step 2:<br></strong> What opportunities do you see: storage that lets u see everything at once without stuff slipping or bunching up. visibility = actually using ur stuff<br>Any patterns that point to a design solution? ppl repurpose hangers for anything long + flimsy (ties, belts, scarves, bags). vertical hanging saves space and keeps things visible. maybe a hanger w loops/slots for multiple items</p><p><strong>Right Picture<br>Step 1:<br></strong> What do I see: banana hanging on pole<br>Why is it placed here: Ran out of counter space maybe<br>What are they doing: storing food / keeping it off the counter so it doesn’t get bruised or squished under other stuff<br>What’s missing: a dedicated spot for fruit that needs to hang. no banana hook or fruit stand so they just used whatever was vertical<br><strong>Step 2:<br></strong> What opportunities do you see: using vertical space in tight areas. kitchens/shared spaces never have enough counter space<br>Any patterns that point to a design solution? ppl hang stuff on anything sticking out (poles, hooks, door handles) when flat surfaces r full. hanging also keeps things visible so u remember to eat it. maybe a clip-on hook that attaches to existing poles/rails</p><p><strong>Patterns across all observations</strong></p><p>All four show people reshaping or relocating something to fit their situation. Three involve light, malleable materials (fabric, paper, thin plastic) that people fold, tuck, wrap, tie, and hang however they need. Even the banana follows the same logic: when there’s no designated spot, people go vertical and use whatever’s there. That’s the main idea I wanted to explore in our midterm: a form that <em>invites</em> hanging, storing, and reshaping on purpose instead of leaving people to improvise.</p><p><strong>Step 3: Best design solution: grip slots on the basket rim</strong></p><p>The obvious fix is a hook, but hooks still need the handle looped over them and can slip off when the basket bumps around. The person didn’t look for a hook at all. They used the wire gaps and the bag’s flexibility. So my idea builds on that: small rubbery grip slots molded into the basket rim corners. Push the bag handle in to hold it, pull to release. No knot, works for any bag size. The key shift was asking what gesture people are <em>already doing</em> instead of what product is missing.</p><p><strong>Human-centered design process</strong></p><ul><li><strong>Empathize:</strong> I started from a real workaround, since workarounds show where design is failing people.</li><li><strong>Define:</strong> people need to secure loose items one-handed, quickly, without a knot.</li><li><strong>Ideate:</strong> I considered hooks, elastic cords, clips, and redesigned bag handles, and picked the one closest to existing behavior.</li><li><strong>Prototype:</strong> rubber tubing or cut silicone zip-tied to a wire basket.</li><li><strong>Test:</strong> watch people use it without explanation. If they push the handle in on their own, it works.</li></ul><p><strong>Applying it to our midterm</strong></p><p>The bag worked because it was flexible enough to wrap around anything, and the basket worked because it had gaps to grab onto. We want to build that flexibility in on purpose. Our product uses wire mesh as its base. It bends around poles, bars, and edges, and its openings act as built-in attachment points for clips, straps, and add-on modules, with grip slots along the mesh so pieces push in and lock. We’ll prototype with hardware-store mesh, try attaching it to tables, poles, hooks, and bag straps, and test whether people figure out how to attach it without instructions.</p><p><strong>Brainstorm method: Extreme users</strong></p><p>Since our idea is about adaptability, I imagined the people who’d push it hardest:</p><ul><li><strong>One free hand</strong> (carrying a baby, using a cane): needs one-motion attach/detach.</li><li><strong>Always moving</strong> (cyclists, delivery workers): mesh has to grip tight and not slide.</li><li><strong>Tiny spaces</strong> (dorms, studios): has to wrap around bed frames, door handles, shower rods.</li><li><strong>Frequent movers/renters:</strong> no drilling, comes off as easily as it goes on.</li><li><strong>Low grip strength</strong> (older adults, arthritis): bending and attaching can’t take much force.</li></ul><p>Wire mesh plus grip slots covers almost all of them, where a regular hook or mount fails most. The biggest insight came from the low grip strength user: if the mesh is too stiff, a lot of people can’t reshape it. So we need to test a few mesh thicknesses to find the balance between flexible and sturdy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c1ee44c99b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Midterm Progress Sketches — Octabuddy]]></title>
            <link>https://medium.com/@navya_batra/midterm-progress-sketches-ec6d0b8d402f?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec6d0b8d402f</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 17:55:21 GMT</pubDate>
            <atom:updated>2026-10-08T17:57:16.543Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Prompt: </em></strong><em>Please submit sketches of at least 4–5 potential interactions or use scenarios of your tangible UI as a Medium post, the materials you would use to create the interactions, and what it would look like and feel like.</em></p><p><strong><em>Team: </em></strong><em>Navya Batra, Evan Bowman, Alex Endo, Vivienne Liu, Elle O’Hill</em></p><p>We started this project really intrigued with the athletics and sports industry. After a lot of iteration, we became inspired by the idea of a keychain or some sort of “wearable buddy” for athletics and sports. We played with different forms and use cases (early sketches at the bottom) before settling on Octabuddy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*BU6XFWyNdiRMjzpJtm1TNw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uzLDrm2Bcd4FdHiHIeXP2Q.jpeg" /></figure><p>Our main goal was to settle on a clear starting input, form, and output before expanding on use cases. From there we would ideate on possible inputs and outputs for Octobuddy.</p><p><strong>Input: </strong>FSR or “Squeeze” interaction to mark the start and end of activity length<br><strong>Form: </strong>An octopus shaped creature with a central node / button to invite interaction<br><strong>Output: </strong>Octopus expands, shrinks, moves / has tangible output according to length of activity</p><p>The following are sketches and descriptions of possible use cases and accompanying implementation plans for our Octabuddy form.</p><p><strong>Use Case #1<br>Potential Output: Shape</strong><br>An “Idle” and an “Active” shape to inform the user when Octobuddy is at “work” per say. Just expanding and resting legs to show resting or active.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McinrhgTOgNVuYe8LOjJ-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSLH_kWUotN2cRGyDfnhEQ.jpeg" /></figure><p><strong>Use Case #2</strong>:<br><strong>Potential Input: Biometric Data<br></strong>Listening to a data stream from our users’ wearable when Octabuddy is in active mode. This creates an opportunity for some really interesting and more specific potential outputs</p><p><strong>Use Case #3</strong>:<br><strong>Potential Input: Gyroscopes for movement</strong><br>When in “Active” mode this could also turn-on the gyroscope to mark movement of octabuddy. For example, if octabuddy is connected to a climbing bag, or to your belt as a keychain, it is swinging as you’re moving in said activity. This amount of movement could maybe indicate rigor and also allow for more interesting outputs.</p><p><strong>Use Case #4</strong><br><strong>Potential</strong> <strong>Output</strong>: <strong>Audio/Haptic Response</strong><br>Using motors or servos to “wind” for the length of the activity. When activity ends, some sort of haptic shake / vibration to indicate the length of activity. (With wearable data there is scope for also making this vibration activity specific)</p><p><strong>Use Case #5<br>Potential</strong> <strong>Output</strong>: <strong>Contraction and Expanding<br></strong>Using <a href="https://tangible.media.mit.edu/project/pneui/">PneUI</a> material to contract and expand Octobuddy according to length of activity and the muscles being used. The idea is to pipette and extract a kinetic sand (or even air) material into some sort of latex material for it to hold and contract in shape. Could also use some sort of vacuum setup to simulate that interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*ktzcV0b8eul9EIEniwfUYw.png" /></figure><p><strong>Use Case #6<br>Potential</strong> <strong>Interaction: Modularity with attachment<br></strong>A keychain on the top head / suction on the legs / flexible material on the legs to allow for clamping on gear, attach to climbing chalk bags, or racing car dashcams, rearview mirrors, gym or track bags, can maybe even potentially wrap around your wrist like a wearable if interested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKRYB4u_wU8u5RXRmFKbFg.jpeg" /></figure><p><strong>Use Case #7<br>Potential Output: Expressions to showcase continuous activity<br></strong>Add a Tomigachi style animation, expression, or simply an LED glow to demonstrate the amount of activity over time, extended periods of idleness, or low battery. Can pair this with haptic and sound output ideas to add more fun and engaging interactions.</p><p><strong>Use Case #8<br>Potential Output: Activity Based Patina<br></strong>Outer fabric of Octabuddy is a material that demonstrates use over time. Leather, Cotton, Denim, etc. A fabric that shows “wear and tear” to celebrate the continuation of activity rather than only demonstrating activity in real time.</p><p><strong>Old Sketches and Ideas</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fn2l9twNdQGk6OhFJqeWFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lhYApe_SW-T-LGGt8PbZCQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZwHNW2DomrXOoPYcWKgdg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec6d0b8d402f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Post-human Design: Our Experiences as Daisy]]></title>
            <link>https://medium.com/@navya_batra/post-human-design-our-experiences-as-daisy-0faa56c2b5f9?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/0faa56c2b5f9</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 09:33:07 GMT</pubDate>
            <atom:updated>2026-10-06T09:36:27.204Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Prompt</em></strong><em>: Take on the persona of a “non-human” in nature. Observe and discuss with your roommates this experience.</em></p><p><strong><em>Team: </em></strong><em>Navya Batra, Evan Bowman, Alex Endo, Vivienne Liu, Elle O’Hill</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sf4a_Ik0L3kvgk1acuz_gA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjvHeyh2Bf1ZUteh8BSKdQ.jpeg" /></figure><p>Our non-human of interest was a single weeded flower, whom we named Daisy, in the Faculty Glade at Berkeley. (Daisy is pictured here… and our mimic of Daisy.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XcFBO0mzG6TBs9xcRhCATA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXT9BRlEXYo0Gz9ZCqqmJw.png" /></figure><p>Our first step in the exercise was to lie quietly with Daisy. A few words consistently stood out about the experience:</p><p>“Warm”<br> “Ambient”<br> “Slow”</p><p>I think these descriptors are very accurate to our experience as Daisy. At first, the sun felt harsh and hot, but after basking for a bit, our collective opinion changed. We grew to appreciate the warmth a little more (and came to the conclusion that we all needed to touch some more grass).</p><p>In our silence, a few sounds really stood out to us. We heard the ambient, faraway chatter of students and people interacting with each other. We could also hear the constant, droning hum of a machine fan from a nearby building. It almost felt disruptive to what should have been a peaceful experience, and we felt the same way when the bell tower rang. This observation led our group into a bigger conversation about designing for an environment versus designing for an individual.</p><p>Something unique about Daisy was that she was the only flower of her kind around us on the lawn. Still, it was easy to see that she was part of a larger ecosystem we couldn’t necessarily see.</p><p>For example, the fan and the bell tower were part of this environment Daisy was experiencing, but didn’t feel like the same natural ambient noise we were experiencing elsewhere. These “noises” were byproducts of human progress, built to serve the people inside campus buildings, instead of the environment (like poor Daisy.) These “things” were designed for the individual HUMAN experience, and a group of individuals. The surrounding environment (be it Daisy, or other Berkeley residents, etc.) simply absorbed the consequences. Even the label “weed” says something: a weed is a plant growing somewhere humans didn’t plan for it. Daisy’s existence, by being a weed, is defined by our perspective, not her own.</p><p>This led us to talk about the process of innovation itself. Innovation feels inevitable; humans will always keep building, improving, and growing. With every step forward, the goal is usually to fix a problem, whether that’s making life more comfortable, efficient, or connected. But somehow, in solving one problem, we often contribute to another. The building gets cooler air: and the glade gets a constant hum. The entirety of campus knows its noon: the bells of the tower echo obnoxiously for the next ten minutes.</p><p>I don’t think we actually landed on a clear answer on what it might mean to design for an entire ecosystem rather than the individual, but I think lying as Daisy reframed our approach with the midterm. Rather than asking what should be made, I think this redirected our conversation to be directed towards how people interact with each other, and their own experiences within an innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0faa56c2b5f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 5 — Piezos]]></title>
            <link>https://medium.com/@navya_batra/lab-5-piezos-d18d66756c40?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18d66756c40</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 09:22:48 GMT</pubDate>
            <atom:updated>2026-10-06T09:22:48.457Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lab 5 — Piezos</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAhr1XLucyE0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FAhr1XLucyE0%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAhr1XLucyE0%2Foar2.jpg%3Fsqp%3D-oaymwEkCJUDENAFSFqQAgHyq4qpAxMIARUAAAAAJQAAyEI9AICiQ3gB%26rs%3DAOn4CLArXYRYEklFu1o85IueCAhGm_xEaw%26usqp%3DCCk&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca7810a14388b1331cdd2227869cb6af/href">https://medium.com/media/ca7810a14388b1331cdd2227869cb6af/href</a></iframe><h3>Description</h3><p>In this lab, the assignment was to utilize a piezo, explore its limits, amplifiers, and generate something cool. I had actually tried going multiple directions with this lab, and through that iteration process settled on a makeshift digital instrument.</p><h3>Logic</h3><p>The final project relied on input from an FSR and a potentiometer to change pitch and volume (to mimic a music instrument or a synth.</p><p>Below is my Arduino file which reads input from my A0 and A1:</p><pre>// Starts silent. Press the force sensor to play: pressure = volume.<br>// Let go and the note fades out. The pot is the pitch knob.<br>// Board: Arduino Uno R4 Minima<br>//<br>// Wiring:<br>//   Piezo: one wire -&gt; pin 9, other wire -&gt; pin 10 (no GND)<br>//   Pot:   outer legs -&gt; 5V and GND, middle leg -&gt; A0<br>//   Force sensor: one leg -&gt; A1, other leg -&gt; GND (no resistor needed)<br><br>const int PIN_A = 9;<br>const int PIN_B = 10;<br>const int POT_PIN = A0;<br>const int FSR_PIN = A1;<br><br>const bool FSR_USE_PULLUP = true;  // true = no resistor needed for the force sensor<br>const int PRESS_THRESHOLD = 900;    // pressure needed before any sound starts<br>const int FULL_PRESS = 1020;        // pressure that counts as full volume<br>const bool SNAP_TO_SCALE = true;   // true = knob steps through notes, false = smooth slide<br><br>const float ATTACK = 0.3;          // how fast volume rises when pressing (0-1)<br>const float RELEASE = 0.04;        // how fast the note fades after letting go (0-1)<br><br>// Pentatonic scale, 3 octaves starting at C3<br>const int SCALE[] = {0, 2, 4, 7, 9};<br>const int SCALE_LEN = 5;<br>const int OCTAVES = 3;<br>const int BASE_NOTE = 48;<br><br>float freq = 261.6;<br>float volume = 0;      // starts off<br>float phase = 0;<br>bool stateA = false, stateB = false;<br>unsigned long lastMicros = 0;<br>unsigned long lastControl = 0;<br>int printCounter = 0;<br><br>float midiToFreq(float midi) {<br>  return 440.0 * pow(2.0, (midi - 69.0) / 12.0);<br>}<br><br>int readPressure() {<br>  int raw = analogRead(FSR_PIN);<br>  return FSR_USE_PULLUP ? 1023 - raw : raw;<br>}<br><br>void updateControls() {<br>  // Force sensor -&gt; target volume<br>  int pressure = readPressure();<br>  float target = 0;<br>  if (pressure &gt; PRESS_THRESHOLD) {<br>    float s = (pressure - PRESS_THRESHOLD) / float(FULL_PRESS - PRESS_THRESHOLD);<br>    s = constrain(s, 0.0, 1.0);<br>    target = 0.15 + 0.85 * s;   // light touch is still audible<br>  }<br><br>  // Smooth volume: quick attack, slow fade out<br>  float rate = (target &gt; volume) ? ATTACK : RELEASE;<br>  volume += (target - volume) * rate;<br>  if (volume &lt; 0.005) volume = 0;<br><br>  // Pot -&gt; pitch<br>  float potT = analogRead(POT_PIN) / 1023.0;<br>  float note;<br>  if (SNAP_TO_SCALE) {<br>    int totalNotes = SCALE_LEN * OCTAVES + 1;<br>    int idx = potT * (totalNotes - 1) + 0.5;<br>    note = BASE_NOTE + 12 * (idx / SCALE_LEN) + SCALE[idx % SCALE_LEN];<br>    freq = midiToFreq(note);<br>  } else {<br>    note = BASE_NOTE + potT * 12 * OCTAVES;<br>    freq += (midiToFreq(note) - freq) * 0.2;   // gentle glide<br>  }<br><br>  // Print every ~50 ms so Serial doesn&#39;t interrupt the sound<br>  if (++printCounter &gt;= 10) {<br>    printCounter = 0;<br>    Serial.println(pressure);<br>  }<br>}<br><br>void setup() {<br>  Serial.begin(115200);<br>  pinMode(PIN_A, OUTPUT);<br>  pinMode(PIN_B, OUTPUT);<br>  digitalWrite(PIN_A, LOW);<br>  digitalWrite(PIN_B, LOW);<br>  if (FSR_USE_PULLUP) pinMode(FSR_PIN, INPUT_PULLUP);<br>  lastMicros = micros();<br>}<br><br>void loop() {<br>  // Advance the waveform<br>  unsigned long now = micros();<br>  unsigned long dt = now - lastMicros;<br>  lastMicros = now;<br>  phase += dt * freq / 1000000.0;<br>  if (phase &gt;= 1.0) phase -= floor(phase);<br><br>  // Volume = how long each pulse lasts. Wider pulses = louder.<br>  float w = 0.5 * volume;<br>  bool a = false, b = false;<br>  if (w &gt; 0.002) {<br>    if (phase &lt; w) a = true;<br>    else if (phase &gt;= 0.5 &amp;&amp; phase &lt; 0.5 + w) b = true;<br>  }<br><br>  if (a != stateA) { digitalWrite(PIN_A, a); stateA = a; }<br>  if (b != stateB) { digitalWrite(PIN_B, b); stateB = b; }<br><br>  // Read the sensor and knob every 5 ms<br>  if (millis() - lastControl &gt;= 5) {<br>    lastControl = millis();<br>    updateControls();<br>  }<br>}</pre><h3>Process</h3><p><em>Materials</em></p><ul><li>Arduino</li><li>Breadboard</li><li>Wires</li><li>Piezo</li><li>FSR</li><li>Potentiometer</li><li>Paper Cup</li><li>Xacto Knife</li><li>Water</li><li>Seran Wrap</li></ul><p>My process was actually really long for this lab. My original fascination with the piezo was its vibrating quality, and I wanted to explore vibrating water or a physical object using the sound waves outputted by the piezo. In that journey, I also explored a lot of different amplifiers and dampners in the process.</p><p><em>Things I learned about the Piezo:</em></p><p>The plastic around the piezo is an amplifier, and can easily be replaced. The metal brass inside that plastic is the actual “speaker” / vibrator. I started with pressing the original amplifier on any small and shallow container with water, to see if it made any affect. I was (as expected) greeted with nothing. I then moved to snapping the plastic off and using a paper cup. I immediately noticed the pitch change regardless of my changing the pitch at all. This observation is what led me to introduce the potentiometer to my project, to see how different pitches also affected different material in terms of vibration (like the way people who sing at a high pitch can crack glass.) With a lot of trial and error, I decided to dumb it down to the lowest level of water, to see if even a single droplet of water could vibrate against a piezo.</p><p>This was my last attempt to vibrate the water droplet with my piezo.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FYQlpvsDOGD4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FYQlpvsDOGD4%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FYQlpvsDOGD4%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2fd53f720104984de790c15ac377e95/href">https://medium.com/media/a2fd53f720104984de790c15ac377e95/href</a></iframe><p>I think from this experience, I learned a couple things about how soundwaves are produced on the piezo (in squares instead of sin waves) and how suspension, material, water, even my fingers can act as amplifiers and dampners to sound and movement. After a few rabbit holes I also found that some artists were able to project the microscopic movement the piezo created in the water using light and reflections instead of trying to watch the movement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNcqlec2POo7iLyvtTpxwA.png" /></figure><p>I think if I had more time to explore different materials and strength of piezo output, I would have wanted to explore this use case a little more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18d66756c40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 4 — Kaliedoscope (Step 1)]]></title>
            <link>https://medium.com/@navya_batra/lab-4-kaliedoscope-step-1-6437c7b1bcac?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/6437c7b1bcac</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 23:07:14 GMT</pubDate>
            <atom:updated>2026-09-29T23:07:14.903Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lab 4 — Kaleidoscope (Step 1)</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FneZI00r-zA0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FneZI00r-zA0%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FneZI00r-zA0%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/86b32b6fb7500ce9feedfecb87df3634/href">https://medium.com/media/86b32b6fb7500ce9feedfecb87df3634/href</a></iframe><h3>Description</h3><p>In this lab, the assignment was to utilize a potentiometer, a Force Sensing Resistor, or a Photocell to create a responsive scene in p5. I really liked the idea of building a kaleidoscope! I think the spinning motion of a Potentiometer can be used to mimic the spinning of a kaleidoscope, and using LEDs, reflective paper, and more could be a really cool way to prototype a digital kaleidoscope. This medium post is going to be a living document of my process of building this kaleidoscope.</p><h3>Logic</h3><p>I first started with building the p5 sketch for it to make sure my FSR and my Potentiometer’s input was registered and my animation could respond to it.</p><p>Below is my Arduino file which reads input from my A0 and A1:</p><pre>const int fsrPin = A0;<br>const int potPin = A1;<br>const int threshold = 50;<br><br>void setup() {<br>  Serial.begin(9600);<br>}<br><br>void loop() {<br>  int fsrReading = analogRead(fsrPin);<br>  int potReading = analogRead(potPin);<br><br>  // Pot: printed every loop in plotter format (label:value)<br>  Serial.print(&quot;Pot:&quot;);<br>  Serial.print(potReading);<br><br>  // FSR: only included when pressed<br>  if (fsrReading &gt; threshold) {<br>    Serial.print(&quot;,FSR:&quot;);<br>    Serial.print(fsrReading);<br>  }<br><br>  Serial.println();<br>  delay(100);<br>}</pre><p>and my p5 file:</p><pre>// noprotect<br>// Kaleidoscope: pot (A1) spins it, FSR (A0) makes light bleed<br>// Works with the Arduino sketch that prints &quot;Pot:512&quot; or &quot;Pot:512,FSR:743&quot;<br>// Run in Chrome or Edge (Web Serial). Close the Arduino Serial Monitor/Plotter first.<br><br>let port, reader;<br>let potValue = 0;<br>let fsrValue = 0;<br>let angle = 0;<br>let bleed = 0; // 0 = dim glass, 1 = full light bleed<br>let lineBuffer = &#39;&#39;;<br>let connectBtn;<br><br>const SEGMENTS = 12;          // number of mirrored slices<br>const SMOOTHING = 0.15;       // spin response (lower = smoother)<br>const BLEED_SMOOTHING = 0.08; // how fast the light swells and fades<br>const FSR_MIN = 50;           // matches the Arduino threshold<br>const FSR_MAX = 800;          // roughly your hard-press reading<br><br>function setup() {<br>  createCanvas(windowWidth, windowHeight);<br>  colorMode(HSB, 360, 100, 100, 100);<br>  connectBtn = createButton(&#39;Connect Arduino&#39;);<br>  connectBtn.position(20, 20);<br>  connectBtn.mousePressed(connectSerial);<br>}<br><br>// ---------- Serial ----------<br><br>async function connectSerial() {<br>  if (!(&#39;serial&#39; in navigator)) {<br>    alert(&#39;Web Serial needs Chrome or Edge.&#39;);<br>    return;<br>  }<br>  port = await navigator.serial.requestPort();<br>  await port.open({ baudRate: 9600 });<br>  connectBtn.hide();<br>  const decoder = new TextDecoderStream();<br>  port.readable.pipeTo(decoder.writable);<br>  reader = decoder.readable.getReader();<br>  readNext();<br>}<br><br>async function readNext() {<br>  const { value, done } = await reader.read();<br>  if (done) return;<br>  lineBuffer += value;<br>  const lines = lineBuffer.split(&#39;\n&#39;);<br>  lineBuffer = lines.pop(); // keep any half-received line<br>  for (const line of lines) parseLine(line.trim());<br>  readNext();<br>}<br><br>function parseLine(line) {<br>  let sawFsr = false;<br>  for (const part of line.split(&#39;,&#39;)) {<br>    const [label, val] = part.split(&#39;:&#39;);<br>    if (val === undefined) continue;<br>    if (label === &#39;Pot&#39;) potValue = int(val);<br>    if (label === &#39;FSR&#39;) { fsrValue = int(val); sawFsr = true; }<br>  }<br>  if (!sawFsr) fsrValue = 0; // Arduino only sends FSR while pressed<br>}<br><br>// ---------- Drawing ----------<br><br>function draw() {<br>  background(250, 40, 8);<br><br>  angle = lerp(angle, map(potValue, 0, 1023, 0, TWO_PI), SMOOTHING);<br>  const targetBleed = constrain(map(fsrValue, FSR_MIN, FSR_MAX, 0, 1), 0, 1);<br>  bleed = lerp(bleed, targetBleed, BLEED_SMOOTHING);<br><br>  translate(width / 2, height / 2);<br>  rotate(angle);<br>  const r = min(width, height) * 0.45;<br><br>  // 1. The glass itself, with dark lead lines<br>  drawKaleidoscope(r, false);<br><br>  // 2. Light bleeding through: a blurred, brighter copy added on top<br>  if (bleed &gt; 0.01) {<br>    blendMode(ADD);<br>    drawingContext.filter = `blur(${8 + bleed * 40}px)`;<br>    push();<br>    scale(1 + bleed * 0.08); // light spills slightly past the edges<br>    drawKaleidoscope(r, true);<br>    pop();<br>    drawingContext.filter = &#39;none&#39;;<br>    drawCoreGlow(r);<br>    blendMode(BLEND);<br>  }<br>}<br><br>function drawKaleidoscope(r, isGlow) {<br>  for (let i = 0; i &lt; SEGMENTS; i++) {<br>    push();<br>    rotate((i * TWO_PI) / SEGMENTS);<br>    if (i % 2 === 1) scale(1, -1); // mirror every other slice<br>    drawSlice(r, isGlow);<br>    pop();<br>  }<br>}<br><br>function drawSlice(r, isGlow) {<br>  const shift = degrees(angle); // colors drift as you turn the knob<br><br>  if (isGlow) {<br>    noStroke();<br>  } else {<br>    stroke(250, 40, 4); // lead came between the glass pieces<br>    strokeWeight(3);<br>  }<br><br>  // Glass brightens as you press; glow layer scales with pressure<br>  const glassBright = 55 + bleed * 45;<br>  const alpha = isGlow ? 65 * bleed : 90;<br><br>  for (let j = 0; j &lt; 6; j++) {<br>    const d = r * (0.15 + j * 0.14);<br>    const hue = (j * 50 + shift) % 360;<br><br>    fill(hue, 75, isGlow ? 100 : glassBright, alpha);<br>    ellipse(d, d * 0.2, r * 0.12, r * 0.05 + j * 3);<br><br>    fill((hue + 180) % 360, 65, isGlow ? 100 : glassBright, alpha);<br>    triangle(d, 0, d + r * 0.08, r * 0.04, d + r * 0.04, -r * 0.03);<br>  }<br>}<br><br>// Warm light source behind the glass<br>function drawCoreGlow(r) {<br>  const ctx = drawingContext;<br>  const g = ctx.createRadialGradient(0, 0, 0, 0, 0, r * 1.1);<br>  g.addColorStop(0, `rgba(255, 240, 210, ${0.35 * bleed})`);<br>  g.addColorStop(1, &#39;rgba(255, 240, 210, 0)&#39;);<br>  ctx.fillStyle = g;<br>  ctx.beginPath();<br>  ctx.arc(0, 0, r * 1.1, 0, TWO_PI);<br>  ctx.fill();<br>}<br><br>function windowResized() {<br>  resizeCanvas(windowWidth, windowHeight);<br>}</pre><h3>Process</h3><p><em>Materials</em></p><ul><li>Arduino</li><li>Breadboard</li><li>Wires</li><li>3 RGB LEDs</li><li>Mirror Film</li><li>Cardboard</li><li>Wax Paper</li><li>Toilet Paper Roll</li><li>Glitter/Rhinestones</li><li>Force Sensing Resistor</li><li>Potentiometer</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ucB1k9mkzVi6N-joztAgHw.png" /><figcaption>My Current Circuit and My goal</figcaption></figure><p>Currently, I just have my circuit wired up and communicating with p5 via Serial. However, I want the potentiometer to actually spin a physical kaleidoscope, along with the animation. This lab, is just the first step into creating that.</p><p>My plan for implementation:</p><p>I want to start with a cardboard prototype of a kaleidoscope. Two tubes. The mechanical twisting of the inner tube will be turned from the mechanical motion of spinning a potentiometer, while the electric signal of the potentiometer will control the light mixing. More to come:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6437c7b1bcac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 3- Exploring Potentiometers]]></title>
            <link>https://medium.com/@navya_batra/lab-3-exploring-potentiometers-f55ea7275b77?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/f55ea7275b77</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 15:13:00 GMT</pubDate>
            <atom:updated>2026-09-21T15:13:00.633Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FaLmhfq38GoE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FaLmhfq38GoE%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FaLmhfq38GoE%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bedc2d824ebf40027973a99153f4996/href">https://medium.com/media/0bedc2d824ebf40027973a99153f4996/href</a></iframe><p>For this lab, our specs were to explore the usage of potentiometers, or variable resistors, in order to change the rate of blinking and brightness of our LEDs.</p><p>For this lab, I think the hardest part was soldering. I soldered three separate potentiometers, with one of them not working. I used two different soldering methods</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jVqYAr_ArrSbybILpw761w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3D5jfWP0t_qDGUnTqVnOHw.png" /><figcaption>My two different soldering methods</figcaption></figure><p>The first way, I did it with the rubber and soldered through the original metal holes. I did this for two potentiometers. With the one pictured above this worked, but for the other, the readings were extremely erratic and would only work when pressure was applied to the wires. This hinted that there was a lot of electricty escaping through this soldering job. I resoldered with a different method. For my last potentiometer, I stripped the wires and wrapped it against the extension metal. This way, I was able to solder around the entire frayed pieces of copper wire and encase all the metal that was carrying electricity. This potentiometer worked, and the rest of the circuit became a lot easier to work with.</p><p>This was my final code:</p><pre>const int brightnessPot = A0;        // controls brightness of all LEDs<br>const int blinkPot = A1;             // controls blink speed<br>const int ledPins[] = {6, 5, 3};     // all PWM pins<br>const int numLeds = 3;<br><br>unsigned long lastToggle = 0;<br>bool ledsOn = true;<br><br>void setup() {<br>  for (int i = 0; i &lt; numLeds; i++) {<br>    pinMode(ledPins[i], OUTPUT);<br>  }<br>}<br><br>void setAll(int level) {<br>  for (int i = 0; i &lt; numLeds; i++) {<br>    analogWrite(ledPins[i], level);<br>  }<br>}<br><br>void loop() {<br>  int brightness = map(analogRead(brightnessPot), 0, 1023, 0, 255);<br>  int blinkValue = analogRead(blinkPot);<br><br>  if (blinkValue &lt; 100) {<br>    ledsOn = true;                                        // steady zone: no blinking<br>  } else {<br>    unsigned long interval = map(blinkValue, 100, 1023, 500, 30);  // 500 ms (slow) -&gt; 30 ms (fast)<br>    if (millis() - lastToggle &gt;= interval) {<br>      ledsOn = !ledsOn;<br>      lastToggle = millis();<br>    }<br>  }<br><br>  setAll(ledsOn ? brightness : 0);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f55ea7275b77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 2 — Makeshift Lava Lamp]]></title>
            <link>https://medium.com/@navya_batra/lab-2-makeshift-lava-lamp-f0c220614648?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0c220614648</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 05:37:20 GMT</pubDate>
            <atom:updated>2026-09-15T05:37:20.699Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lab 2- Digital I/O Lab: Makeshift Lava Lamp</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRf-sq9guoQw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FRf-sq9guoQw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRf-sq9guoQw%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2b9854618ed63288c3f86f833b889a6/href">https://medium.com/media/a2b9854618ed63288c3f86f833b889a6/href</a></iframe><h3>Description</h3><p>In this lab, the assignment was to build a diffuser using RGB LEDs and keyboard input. While experimenting with different diffusers, I also developed a little bit of an interest in also exploring reflectors with light. I wanted to explore diffusion and color mixing while also playing with patterns and natural movement to see how it can adjust the way we see light! This is my makeshift LED lava lamp!</p><h3>Logic</h3><p>My serial takes in input of either “n”, “s”, or “o” to demonstrate the color schemes of the respective scenes: “Night sky,” “Sunset,” and “Ocean.” Each of these scenes fade between a set of RGB values I picked using Claude’s help to align with the palette of each of the scenes. The demo video is on “sunset” mode.</p><pre>char serInString[100];  // holds incoming serial bytes<br>char colorCode;<br><br>int redPin   = 9;   // Red LED,   connected to digital pin 9<br>int greenPin = 10;  // Green LED, connected to digital pin 10<br>int bluePin  = 11;  // Blue LED,  connected to digital pin 11<br><br>// ---- color palettes ----<br>// values pushed toward the extremes (closer to 0 or 255) for more<br>// dramatic contrast between fade targets<br>struct Color { int r; int g; int b; };<br><br>Color nightSkyPalette[] = {<br>  {5, 5, 30},       // near-black indigo<br>  {20, 15, 100},    // deep indigo<br>  {70, 10, 160},    // violet<br>  {5, 5, 50},       // dark navy<br>  {110, 20, 190}    // soft purple<br>};<br>const int nightSkyCount = 5;<br><br>Color sunsetPalette[] = {<br>  {255, 70, 5},     // orange<br>  {255, 10, 80},    // pink/red<br>  {255, 170, 10},   // gold<br>  {220, 5, 120},    // magenta<br>  {255, 30, 20}     // red-orange<br>};<br>const int sunsetCount = 5;<br><br>Color oceanPalette[] = {<br>  {0, 130, 160},    // teal<br>  {0, 210, 230},    // cyan<br>  {20, 230, 180},   // seafoam<br>  {5, 50, 170},     // deep blue<br>  {0, 170, 200}     // aqua<br>};<br>const int oceanCount = 5;<br><br>Color* currentPalette = nightSkyPalette;<br>int currentPaletteCount = nightSkyCount;<br><br>// ---- per-channel independent fade state ----<br>struct ChannelFade {<br>  float current;<br>  int fromVal;<br>  int toVal;<br>  unsigned long fadeStart;<br>  unsigned long fadeDuration;<br>};<br><br>ChannelFade rFade = {10, 10, 25, 0, 1800};<br>ChannelFade gFade = {10, 10, 20, 0, 2200};<br>ChannelFade bFade = {40, 40, 80, 0, 2600};<br><br>void setup() {<br>  pinMode(redPin,   OUTPUT);<br>  pinMode(greenPin, OUTPUT);<br>  pinMode(bluePin,  OUTPUT);<br>  Serial.begin(9600);<br>  randomSeed(analogRead(A0));  // unused analog pin, for real randomness<br><br>  unsigned long now = millis();<br>  rFade.fadeStart = now;<br>  gFade.fadeStart = now;<br>  bFade.fadeStart = now;<br><br>  Serial.println(&quot;Modes: &#39;n&#39;=Night Sky  &#39;s&#39;=Sunset  &#39;o&#39;=Ocean&quot;);<br>}<br><br>void loop () {<br>  // clear the string<br>  memset(serInString, 0, 100);<br>  // read the serial port and create a string out of what you read<br>  readSerialString(serInString);<br><br>  colorCode = serInString[0];<br>  if (colorCode == &#39;n&#39; || colorCode == &#39;s&#39; || colorCode == &#39;o&#39;) {<br>    serInString[0] = 0;  // indicates we&#39;ve used this string<br>    if (colorCode == &#39;n&#39;) setPalette(nightSkyPalette, nightSkyCount, &quot;Night Sky&quot;);<br>    else if (colorCode == &#39;s&#39;) setPalette(sunsetPalette, sunsetCount, &quot;Sunset&quot;);<br>    else if (colorCode == &#39;o&#39;) setPalette(oceanPalette, oceanCount, &quot;Ocean&quot;);<br>  }<br><br>  // update each channel independently<br>  updateChannel(rFade, &#39;r&#39;);<br>  updateChannel(gFade, &#39;g&#39;);<br>  updateChannel(bFade, &#39;b&#39;);<br><br>  analogWrite(redPin,   (int)rFade.current);<br>  analogWrite(greenPin, (int)gFade.current);<br>  analogWrite(bluePin,  (int)bFade.current);<br><br>  delay(15);  // smooth updates<br>}<br><br>// advances one channel&#39;s fade, picking a new random target (with its own<br>// random duration) once it reaches the current one<br>void updateChannel(ChannelFade &amp;ch, char channelId) {<br>  unsigned long elapsed = millis() - ch.fadeStart;<br>  float t = (float)elapsed / (float)ch.fadeDuration;<br><br>  if (t &gt;= 1.0) {<br>    ch.fromVal = ch.toVal;<br>    ch.toVal = randomTargetForChannel(channelId);<br>    ch.fadeDuration = random(1200, 3000);  // 1.2-3 sec, fast + independent per channel<br>    ch.fadeStart = millis();<br>    t = 0.0;<br>  }<br><br>  // cosine easing so it still lingers slightly near each value rather than<br>  // moving totally linearly, but with the shorter duration it reads as snappy<br>  float smoothT = (1 - cos(t * PI)) / 2.0;<br>  ch.current = ch.fromVal + (ch.toVal - ch.fromVal) * smoothT;<br>}<br><br>// picks a random color from the current palette and returns just the<br>// component that matches this channel (r, g, or b)<br>int randomTargetForChannel(char channelId) {<br>  int index = random(0, currentPaletteCount);<br>  Color c = currentPalette[index];<br>  if (channelId == &#39;r&#39;) return c.r;<br>  if (channelId == &#39;g&#39;) return c.g;<br>  return c.b;<br>}<br><br>// switches the active palette; channels keep drifting independently from<br>// wherever they currently are toward new targets in the new palette<br>void setPalette(Color* palette, int count, const char* name) {<br>  currentPalette = palette;<br>  currentPaletteCount = count;<br><br>  unsigned long now = millis();<br>  rFade.fromVal = (int)rFade.current; rFade.toVal = randomTargetForChannel(&#39;r&#39;); rFade.fadeStart = now;<br>  gFade.fromVal = (int)gFade.current; gFade.toVal = randomTargetForChannel(&#39;g&#39;); gFade.fadeStart = now;<br>  bFade.fromVal = (int)bFade.current; bFade.toVal = randomTargetForChannel(&#39;b&#39;); bFade.fadeStart = now;<br><br>  Serial.print(&quot;Mode: &quot;);<br>  Serial.println(name);<br>}<br><br>// read a string from the serial and store it in an array<br>// you must supply the array variable<br>void readSerialString (char *strArray) {<br>  int i = 0;<br>  if (!Serial.available()) {<br>    return;<br>  }<br>  while (Serial.available()) {<br>    strArray[i] = Serial.read();<br>    i++;<br>  }<br>}</pre><h3>Process</h3><p><em>Materials</em></p><ul><li>Arduino</li><li>Breadboard</li><li>Wires</li><li>3 RGB LEDs</li><li>Aluminum Foil</li><li>Cardboard</li><li>Wax Paper</li><li>Plastic Empty Water Bottle</li><li>Trash Bag</li><li>Empty Glass Jar (Texture adds some cool dimension)</li><li>Water</li><li>Glitter/Rhinestones</li></ul><p>I first started with picking the ideal diffuser. A particular issue I had was light escaping my diffusers, and causing pinpoint identification of each of my colors. I explored multiple different shapes, material, and setups. Some of them are pictured here. My final choice was to use both tinfoil and wax paper. I lined the inner walls of a cardboard box with tinfoil to reflect the light within the cardboard box, and used wax paper as the final diffuser. This way each color would hit the diffuser/mixer material from multiple angles instead of one central point, allowing for mixing to look a little more seamless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sToYk1plxr4LbipllB2H3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAZ7joWonp7UoqBEIniohg.png" /></figure><p>After picking my diffuser and exploring a bit of reflection, I decided to add another layer with reflection inspired from glowing lava lamps! I first tried oil and water, but the liquid was a bit too opaque, and quite gross to be honest. So I started iterating with different mixers like glitter, tinfoil, and finally used rhinestones. I found that doing it in the dark was the most effective, so I could give the illusion of lava drops using shadows instead of the actual material itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qe4eQWJ6KV8tfn483kT5Jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Z2i9RlhNnGPoRNL9polyg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0c220614648" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 1 — Sound Responsive Blinking LEDs with Arduino]]></title>
            <link>https://medium.com/@navya_batra/lab-1-sound-responsive-blinking-leds-with-arduino-c76f0d1439bf?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/c76f0d1439bf</guid>
            <category><![CDATA[led]]></category>
            <category><![CDATA[light]]></category>
            <category><![CDATA[sound-design]]></category>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 02:47:41 GMT</pubDate>
            <atom:updated>2026-09-08T02:47:41.851Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fr9FESOMijwY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr9FESOMijwY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr9FESOMijwY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bdab3e6d9284c586e2c96eb8f386641a/href">https://medium.com/media/bdab3e6d9284c586e2c96eb8f386641a/href</a></iframe><p><strong>Setup</strong></p><ul><li>Green LED, Blue LED, Red LED</li><li>Three 220 Ohms-resistors</li><li>Breadboard</li><li>Wires</li><li>USB-C Connector</li><li>AZ-3040E-W Piezo buzzer w/ attached wires</li></ul><p><strong>My Process<br></strong>I wasn’t super familiar with using Arduino and proper way to wire so I first started in tinkerCad with the basic blink code, to just prototype blinking a single LED. After some trial and error, I was able to have the LED blink in tinkerCAD and I moved over to the real Arduino.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1BzuKncbrpRpe2npYRyJg.png" /><figcaption>Prototyping in tinkerCAD</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gqWSRa5xFyZCwDZIPsxI8w.png" /><figcaption>Prototyping a single blinking light</figcaption></figure><p>After having a single blinking light, I wanted to add a sound component. I used the AZ-3040E-W Piezo buzzer given in our lab kits. While connecting this to my Arduino, I learned that these buzzers do not need resistors. It’s not that they never do, but Piezo (a type of material that makes that vibrating sound in the speaker) elements in particular are naturally “high-impedance” (resistant to electrical flow) enough to not need a resistor to slow the electric flow. This was the first batch of code I used to add the buzzing element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*EwsTnlRvCaRgL3ltjXoByw.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dd-s6rFwlYjI&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fd-s6rFwlYjI%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1199073067e060f6f16aaf9a00bc769/href">https://medium.com/media/d1199073067e060f6f16aaf9a00bc769/href</a></iframe><p>After having two lights blinking at the same time as the sound buzzing, I started playing with the code a bit so I could change pitch of the buzzer, and have associated colors respond. The top of this article shows the final product. This was my final code.</p><pre>int led1 = 13;   // C4<br>int led2 = 9;    // D4<br>int led3 = 10;   // E4<br>int buzzer = 8;<br><br>#define NOTE_C4  262<br>#define NOTE_D4  294<br>#define NOTE_E4  330<br>#define REST     0<br><br>int melody[] = {<br>  NOTE_C4, NOTE_D4, NOTE_E4, NOTE_C4, NOTE_D4, NOTE_E4<br>};<br><br>int noteDurations[] = {<br>  6, 6, 6, 6, 6, 6<br>};<br><br>int numNotes = sizeof(melody) / sizeof(melody[0]);<br><br>void setup() {<br>  pinMode(led1, OUTPUT);<br>  pinMode(led2, OUTPUT);<br>  pinMode(led3, OUTPUT);<br>  pinMode(buzzer, OUTPUT);<br>}<br><br>void allOff() {<br>  digitalWrite(led1, LOW);<br>  digitalWrite(led2, LOW);<br>  digitalWrite(led3, LOW);<br>}<br><br>void loop() {<br>  for (int i = 0; i &lt; numNotes; i++) {<br>    int duration = 1000 / noteDurations[i];<br><br>    if (melody[i] != REST) {<br>      tone(buzzer, melody[i], duration);<br><br>      allOff();<br>      if (melody[i] == NOTE_C4) {<br>        digitalWrite(led1, HIGH);<br>      } else if (melody[i] == NOTE_D4) {<br>        digitalWrite(led2, HIGH);<br>      } else if (melody[i] == NOTE_E4) {<br>        digitalWrite(led3, HIGH);<br>      }<br>    } else {<br>      allOff();<br>    }<br><br>    int pauseBetweenNotes = duration * 1.30;<br>    delay(pauseBetweenNotes);<br><br>    allOff();<br>    noTone(buzzer);<br>  }<br><br>  delay(1000);<br>}</pre><p>Here are the circuit diagrams for each iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csOdvP-ZVMpoyY7id6YTaA.png" /><figcaption>Circuit Diagrams</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c76f0d1439bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navya Batra]]></title>
            <link>https://medium.com/@navya_batra/navya-batra-2401df34645e?source=rss-ce574eab1963------2</link>
            <guid isPermaLink="false">https://medium.com/p/2401df34645e</guid>
            <dc:creator><![CDATA[Navya Batra]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 06:57:18 GMT</pubDate>
            <atom:updated>2026-09-03T06:57:18.066Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m a first year MDes student excited to be here! I have a Computer Science background, with a few projects in AI, health-tech, and motion responsive art work! I’m more curious in exploring how to use technology as an expressive medium. Build that bridge between technology and humanity using inherently human crafts like art, music, etc.</p><p>Check out my portfolio to see more:<br> <a href="https://www.navyabatra.com/">https://www.navyabatra.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2401df34645e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>