<?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 Ethan Hong on Medium]]></title>
        <description><![CDATA[Stories by Ethan Hong on Medium]]></description>
        <link>https://medium.com/@seung-wook?source=rss-67a7fdaf3550------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wp1G0G0_p0miTCouGr6P4A.jpeg</url>
            <title>Stories by Ethan Hong on Medium</title>
            <link>https://medium.com/@seung-wook?source=rss-67a7fdaf3550------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:52:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@seung-wook/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: DC Motors]]></title>
            <link>https://medium.com/@seung-wook/lab-6-dc-motors-5435bbfee71c?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/5435bbfee71c</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 10:44:37 GMT</pubDate>
            <atom:updated>2026-10-12T10:44:37.184Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating a Halloween-Themed Pinwheel</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMu48O_golM-bwPyw4D2yA.png" /></figure><h4>Description</h4><p>In this lab, I used a DC motor, a photocell, and a LED to create a halloween-themed pinwheel which will stop rotating and show a random halloween symbol when a hand is placed close to the photocell and blink.</p><h4>Components Used</h4><ul><li>Arduino UNO</li><li>1 DC Motor</li><li>1 Diode</li><li>1 Transistor</li><li>1 Battery Pack (2 AA Batteries)</li><li>1 Photocell</li><li>1 RGB LED</li><li>1 10kΩ Resistor (connected to the photocell)</li><li>1 1kΩ Resistor (connected to the transistor’s base)</li><li>2 330Ω Resistor (connected to the RGB LED’s red and green pins)</li></ul><h4>Code</h4><p>During setup, the code calculates the baseline average brightness detected by the photocell.</p><p>If the photocell detects the environment getting dimmer than the threshold, then the DC motor will stop running and the LED will blink in orange.</p><pre>int motorPin = 9;<br>int ldrPin = A0;<br><br>int redPin = 10;<br>int greenPin = 11;<br><br>int baseline = 0;<br><br>int threshold = 80;<br>int motorSpeed = 100;<br><br>unsigned long previousBlinkTime = 0;<br>const int blinkInterval = 100;<br>bool ledOn = false;<br><br>void setup() {<br>  pinMode(ldrPin, INPUT);<br>  pinMode(motorPin, OUTPUT);<br>  pinMode(redPin, OUTPUT);<br>  pinMode(greenPin, OUTPUT);<br><br>  Serial.begin(9600);<br><br>  // Measure the initial ambient light level<br>  long total = 0;<br><br>  for (int i = 0; i &lt; 100; i++) {<br>    total += analogRead(ldrPin);<br>    delay(10);<br>  }<br><br>  baseline = total / 100;<br><br>  Serial.print(&quot;Baseline: &quot;);<br>  Serial.println(baseline);<br>}<br><br>void loop() {<br>  int ldrVal = analogRead(ldrPin);<br><br>  Serial.print(&quot;LDR: &quot;);<br>  Serial.println(ldrVal);<br><br>  if (ldrVal &lt; baseline - threshold) {<br>    analogWrite(motorPin, 0);<br>    if (millis() - previousBlinkTime &gt;= blinkInterval) {<br>      previousBlinkTime = millis();<br>      ledOn = !ledOn;<br>      if (ledOn) {<br>        analogWrite(redPin, 255);<br>        analogWrite(greenPin, 100);<br>      }<br>      else {<br>        analogWrite(redPin, 0);<br>        analogWrite(greenPin, 0);<br>      }<br>    }<br>  }<br>  else {<br>    analogWrite(motorPin, motorSpeed);<br>    analogWrite(redPin, 0);<br>    analogWrite(greenPin, 0);<br>    ledOn = false;<br>  }<br>  delay(10);<br>}</pre><h4>Video</h4><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiBEmaZJ2YWk&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiBEmaZJ2YWk%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dace512e560a760c3a166fe1d56af482/href">https://medium.com/media/dace512e560a760c3a166fe1d56af482/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5435bbfee71c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 5: Piezo Speaker & Input-Output Coincidence]]></title>
            <link>https://medium.com/@seung-wook/lab-5-piezo-speaker-input-output-coincidence-02aaa1270837?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/02aaa1270837</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 02:06:36 GMT</pubDate>
            <atom:updated>2026-10-05T02:17:40.689Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Mini Music Box That Plays Five Notes with a Piezo Speaker Based on FSR Input</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ig2w3Pp1KoAOzGxndcHOyw.jpeg" /></figure><h4>Description</h4><p>In this lab, I created a mini music box whose piezo speaker plays one of five notes — do, re, mi, fa, or sol — depending on how much force the user applies to a force-sensitive resistor (FSR).</p><p>The box also includes a rotating musical-note symbol and five LEDs, creating a stronger sense of input-output coincidence by providing visual and physical feedback alongside the sound.</p><h4>Components</h4><ul><li>Arduino UNO</li><li>Breadboard</li><li>1 Piezo Speaker</li><li>1 Force-Sensitive Resistor (FSR)</li><li>7 330Ω Resistors (2 were replaced with 1kΩ resistors because I did not have enough 330Ω resistors)</li><li>2 10kΩ Resistors</li></ul><h4>Fabrication</h4><p>I created a simple laser-cutting plan for the box. I added a rectangular opening for the servo motor and five 5 mm-diameter holes for the LEDs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ae8ycsKP-Ogcxd-cSkZtlw.png" /><figcaption>Laser-cutting plan for the box</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*t2Fbg9Ep8B7JoI5Oh_a6YQ.png" /><figcaption>Laser-cut box being assembled with glue</figcaption></figure><p>The musical-note symbol was 3D printed with a hole that allowed it to be attached securely to the servo motor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6YpSNhhx9W5NG_q-91Jk6g.png" /><figcaption>3D model and printed version of the musical-note symbol</figcaption></figure><h4>Circuit Configuration</h4><p>The LEDs were connected to digital I/O pins 2–8. The red LED was connected to pin 2. For the yellow RGB LED, the red and green channels were connected to pins 3 and 4. The green LED was connected to pin 5. For the cyan RGB LED, the green and blue channels were connected to pins 6 and 7. The blue LED was connected to pin 8.</p><p>The FSR was connected to analog input pin A0.</p><p>The servo motor was connected to digital I/O pin 10, and the piezo speaker was connected to pin 12.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MN1fSwiluT_vPT1vN_CBfA.png" /><figcaption>Circuit configuration (drawn using Tinkercad)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-eAtvQFR0fzYw_MJyQNWbw.png" /><figcaption>Schematic (drawn using Tinkercad)</figcaption></figure><h4>Coding</h4><p>The code was written so that the servo motor rotates continuously according to the amount of force applied to the FSR.</p><p>I also defined five input thresholds — 150, 300, 450, 600, and 750. As the FSR reading exceeds each threshold, the piezo speaker plays the corresponding note — do, re, mi, fa, or sol — and the corresponding LED turns on. The LEDs accumulate as the force increases, so reaching a higher threshold keeps all LEDs from the lower thresholds illuminated as well.</p><pre>#include &lt;Servo.h&gt;<br><br>const int FSR_PIN = A0;<br>const int SERVO_PIN = 10;<br>const int PIEZO_PIN = 12;<br><br>const int RED_PIN = 2;<br><br>const int YELLOW_R_PIN = 3;<br>const int YELLOW_G_PIN = 4;<br><br>const int GREEN_PIN = 5;<br><br>const int CYAN_G_PIN = 6;<br>const int CYAN_B_PIN = 7;<br><br>const int BLUE_PIN = 8;<br><br>// FSR Thresholds<br>const int T1 = 150;  // Do<br>const int T2 = 300;  // Re<br>const int T3 = 450;  // Mi<br>const int T4 = 600;  // Fa<br>const int T5 = 750;  // Sol<br>const int FSR_MAX = 900;<br><br>// Notes<br>const int NOTE_C = 523;  // Do<br>const int NOTE_D = 587;  // Re<br>const int NOTE_E = 659;  // Mi<br>const int NOTE_F = 698;  // Fa<br>const int NOTE_G = 784;  // Sol<br><br>Servo myServo;<br>float smoothedFSR = 0;<br>const float SMOOTHING = 0.15;<br><br>void setup() {<br><br>  Serial.begin(9600);<br><br>  pinMode(PIEZO_PIN, OUTPUT);<br><br>  myServo.attach(SERVO_PIN);<br>  myServo.write(0);<br><br>  pinMode(RED_PIN, OUTPUT);<br>  pinMode(YELLOW_R_PIN, OUTPUT);<br>  pinMode(YELLOW_G_PIN, OUTPUT);<br>  pinMode(GREEN_PIN, OUTPUT);<br>  pinMode(CYAN_G_PIN, OUTPUT);<br>  pinMode(CYAN_B_PIN, OUTPUT);<br>  pinMode(BLUE_PIN, OUTPUT);<br>  allLEDsOff();<br>}<br><br>void loop() {<br>  // FSR Read &amp; Smoothen<br>  int rawFSR = analogRead(FSR_PIN);<br>  smoothedFSR = smoothedFSR * (1.0 - SMOOTHING) + rawFSR * SMOOTHING;<br>  int fsr = (int)smoothedFSR;<br>  Serial.println(fsr);<br><br><br>  // Output<br>  myServo.write(calculateServoAngle(fsr));<br>  updateLEDs(fsr);<br>  updatePiezo(fsr);<br><br>  delay(5);<br>}<br><br>int calculateServoAngle(int fsr) {<br>  if(fsr &lt; T1) return map(fsr, 0, T1, 0, 30);<br>  else if(fsr &gt; T5) return map(fsr, T5, FSR_MAX, 170, 180);<br>  else return map(fsr, T1, T5, 30, 170);<br>}<br><br>void updateLEDs(int fsr) {<br>  if(fsr &gt;= T1) digitalWrite(RED_PIN, HIGH);<br>  else digitalWrite(RED_PIN, LOW);<br><br>  if(fsr &gt;= T2) {<br>    digitalWrite(YELLOW_R_PIN, HIGH);<br>    digitalWrite(YELLOW_G_PIN, HIGH);<br>  }<br>  else {<br>    digitalWrite(YELLOW_R_PIN, LOW);<br>    digitalWrite(YELLOW_G_PIN, LOW);<br>  }<br><br>  if(fsr &gt;= T3) digitalWrite(GREEN_PIN, HIGH);<br>  else digitalWrite(GREEN_PIN, LOW);<br><br>  if(fsr &gt;= T4) {<br>    digitalWrite(CYAN_G_PIN, HIGH);<br>    digitalWrite(CYAN_B_PIN, HIGH);<br>  }<br>  else {<br>    digitalWrite(CYAN_G_PIN, LOW);<br>    digitalWrite(CYAN_B_PIN, LOW);<br>  }<br><br>  if(fsr &gt;= T5) digitalWrite(BLUE_PIN, HIGH);<br>  else digitalWrite(BLUE_PIN, LOW);<br>}<br><br>void allLEDsOff() {<br>  digitalWrite(RED_PIN, LOW);<br>  digitalWrite(YELLOW_R_PIN, LOW);<br>  digitalWrite(YELLOW_G_PIN, LOW);<br>  digitalWrite(GREEN_PIN, LOW);<br>  digitalWrite(CYAN_G_PIN, LOW);<br>  digitalWrite(CYAN_B_PIN, LOW);<br>  digitalWrite(BLUE_PIN, LOW);<br>}<br><br>void updatePiezo(int fsr) {<br>  if(fsr &lt; T1) {<br>    noTone(PIEZO_PIN);<br>    return;<br>  }<br><br>  if(fsr &lt; T2) tone(PIEZO_PIN, NOTE_C);<br>  else if(fsr &lt; T3) tone(PIEZO_PIN, NOTE_D);<br>  else if(fsr &lt; T4) tone(PIEZO_PIN, NOTE_E);<br>  else if(fsr &lt; T5) tone(PIEZO_PIN, NOTE_F);<br>  else tone(PIEZO_PIN, NOTE_G);<br>}</pre><h4>Video</h4><p>Watch the music box in action!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxDOiRJcK_c8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxDOiRJcK_c8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxDOiRJcK_c8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/86b5aed0a93926a0f898e9b661b0df0b/href">https://medium.com/media/86b5aed0a93926a0f898e9b661b0df0b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02aaa1270837" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 4: Playing a Mario Game with a Force Sensor, Potentiometer, and Photocell]]></title>
            <link>https://medium.com/@seung-wook/lab-4-playing-a-mario-game-with-a-force-sensor-potentiometer-and-photocell-c2a6bb4b7baa?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2a6bb4b7baa</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 07:58:59 GMT</pubDate>
            <atom:updated>2026-09-26T07:58:59.399Z</atom:updated>
            <content:encoded><![CDATA[<h4>Control your Mario game more intuitively with sensors!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8QOu5ubODo6m-d0SYLq1Q.jpeg" /></figure><h4>Description</h4><p>In this lab, I imagined playing a Mario game more intuitively with physical sensors. The force sensor would make the Mario jump, the potentiometer would control Mario’s speed, and the photocell would change the background of the game between day and night.</p><h4>Components Used</h4><ul><li>Arduino UNO</li><li>Breadboard</li><li>1 Force-Sensitive Resistor</li><li>1 Potentiometer</li><li>1 Photocell</li><li>2 10kΩ Resistors</li></ul><h4>Setting Up the Arduino Inputs</h4><p>The sensors were connected to the Arduino as shown in the diagrams below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gORtwXz_9v2wV77bHUIvpA.png" /><figcaption>Circuit configuration (drawn using Tinkercad)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ow-Ub4fsIFUhmLQ5zkWbDw.png" /><figcaption>Schematic (drawn using Tinkercad)</figcaption></figure><p>By modifying the code provided during class, I first checked whether the sensor values were being read as expected. I programmed the Arduino to print the sensor values through serial communication, using commas (,) as delimiters.</p><pre>const int fsrIn = A0;<br>const int potIn = A1;<br>const int photocellIn = A2;<br><br>void setup() {<br>  Serial.begin(9600);<br>}<br><br>void loop() {<br>  // read the sensor value from the analog input pin<br>  int fsrVal = analogRead(fsrIn);<br>  int potVal = analogRead(potIn);<br>  int photocellVal = analogRead(photocellIn);<br><br>  Serial.println(String(fsrVal)+&quot;,&quot;+String(potVal)+&quot;,&quot;+String(photocellVal));<br><br>  // wait 2 milliseconds before the next loop<br>  // for the analog-to-digital converter to settle<br>  // after the last reading:<br>  delay(2);<br>}</pre><h4>Arduino to p5.js</h4><p>Using the code provided during class, I then checked whether the sensor values were being transmitted properly from the Arduino to p5.js through serial communication.</p><p>Initially, the displayed values fluctuated significantly, and I realized that each chunk of serial data did not always contain a complete line of information. To address this issue, an input buffer was added so that incoming data would be collected and processed one complete line at a time.</p><pre>let latestData = &quot;&quot;;<br>let status = &quot;disconnected&quot;;<br>let fsrVal, potVal, photocellVal;<br>let inputBuffer = &quot;&quot;;<br><br>function setup() {<br>  createCanvas(windowWidth, windowHeight);<br>  textSize(24);<br><br>  let connectButton = createButton(&quot;Connect to Arduino&quot;);<br>  connectButton.position(10, 10);<br>  connectButton.mousePressed(initSerial);<br>}<br><br>async function initSerial() {<br>  try {<br>    const port = await navigator.serial.requestPort();<br>    await port.open({ baudRate: 9600 });<br>    status = &quot;connected&quot;;<br><br>    const decoder = new TextDecoderStream();<br>    port.readable.pipeTo(decoder.writable);<br>    const reader = decoder.readable.getReader();<br><br>    // Use setTimeout to read outside p5&#39;s loop detection<br>    function scheduleRead() {<br>      reader.read().then(({ value, done }) =&gt; {<br>        if (done) return;<br>        if (value){<br>          inputBuffer += value;<br>          let lines = inputBuffer.split(&quot;\n&quot;);<br>          inputBuffer = lines.pop();<br>          <br>          for (let line of lines) {<br>            line = line.trim();<br>            let values = line.split(&quot;,&quot;);<br>            if(values[0] || values[0] == 0) fsrVal = values[0];<br>            if(values[1] || values[1] == 0) potVal = values[1];<br>            if(values[2] || values[2] == 0) photocellVal = values[2];<br>          }<br>        }<br>        scheduleRead(); // schedule next read<br>      });<br>    }<br>    scheduleRead();<br><br>  } catch (err) {<br>    status = &quot;error: &quot; + err.message;<br>  }<br>}<br><br>function draw() {<br>  background(255);<br>  fill(0);<br>  noStroke();<br><br>  text(&quot;Status: &quot; + status, 10, 60);<br>  text(&quot;FSR: &quot; + fsrVal, 10, 90);<br>  text(&quot;Pot: &quot; + potVal, 10, 120);<br>  text(&quot;Photocell: &quot; + photocellVal, 10, 150);<br>}</pre><h4>Connecting the Sensor Values to the Mario Game</h4><p>I used a Mario game created in p5.js by user <em>demo98551</em>. You can check out the original version <a href="https://editor.p5js.org/demo98551/sketches/HGVaHvUxF">here</a>.</p><p>I modified the code so that Mario’s vertical velocity, which determines the strength of his jump, is controlled by the input value from the force-sensitive resistor. The potentiometer controls Mario’s horizontal speed — or, more precisely in the implementation, the negative horizontal velocity of the background and other game elements.</p><p>A night version of the background was also created and I programmed the game so that when the photocell detects a low light level, the background switches to the night version.</p><pre>var mario, marioImg, backgroundImg, nightBackgroundImg;<br>var obstacle1;<br>var invisibleGround, obstaclesgroup, bricksgroup, mario_collided, restartimg, gameoverimg, restart, gameover;<br>var bg;<br>var jumpSound, dieSound, checkPointSound;<br>var gameState = &quot;play&quot;;<br><br>let arduinoStatus = &quot;disconnected&quot;;<br>let fsrVal = 0, potVal = 512, photocellVal = 150;<br>let inputBuffer = &quot;&quot;;<br><br>var brickImg;<br>var score;<br>var brick;<br>function preload() {<br><br>  marioImg = loadAnimation(&quot;mario00.png&quot;, &quot;mario01.png&quot;, &quot;mario02.png&quot;, &quot;mario03.png&quot;);<br>  backgroundImg = loadImage(&quot;bg.png&quot;);<br>  nightBackgroundImg = loadImage(&quot;bg_night.png&quot;);<br>  ground2img = loadImage(&quot;ground2.png&quot;)<br>  obstacle1 = loadAnimation(&quot;obstacle1.png&quot;, &quot;obstacle2.png&quot;, &quot;obstacle3.png&quot;, &quot;obstacle4.png&quot;);<br><br>  brickImg = loadImage(&quot;brick.png&quot;);<br>  mario_collided = loadAnimation(&quot;collided.png&quot;)<br>  restartimg = loadImage(&quot;restart.png&quot;)<br>  gameoverimg = loadImage(&quot;gameOver.png&quot;)<br>  jumpSound = loadSound(&quot;jump.mp3&quot;);<br>  dieSound = loadSound(&quot;die.mp3&quot;);<br>  checkPointSound = loadSound(&quot;checkPoint.mp3&quot;);<br><br>}<br>function setup() {<br>  let canvas = createCanvas(600, 300);<br>  let connectButton = createButton(&quot;Connect to Arduino&quot;);<br>  connectButton.position(10, 310);<br>  connectButton.mousePressed(initSerial);<br><br>  obstaclesgroup = new Group();<br>  bricksgroup = new Group();<br><br>  bg = createSprite(300, 290);<br>  bg.addImage(&quot;bg&quot;, ground2img);<br>  bg.scale = 1;<br><br>  mario = createSprite(50, 250, 20, 20);<br>  mario.addAnimation(&quot;mario&quot;, marioImg);<br>  mario.addAnimation(&quot;collision&quot;, mario_collided)<br>  mario.scale = 2;<br><br>  gameover = createSprite(300, 150, 10, 10);<br>  gameover.addImage(&quot;over1&quot;, gameoverimg);<br>  gameover.scale = 1;<br><br>  restart = createSprite(300, 200, 10, 10);<br>  restart.addImage(&quot;starting&quot;, restartimg);<br>  restart.scale = 0.5;<br><br>  gameover.visible = false;<br>  restart.visible = false;<br><br>  invisibleGround = createSprite(50, 260, 600, 10)<br>  invisibleGround.visible = false;<br><br>  mario.setCollider(&quot;rectangle&quot;, 0, 0, 20, mario.height);<br>  // mario.debug=true;<br><br>  score = 0;<br><br>}<br>function draw() {<br>  if(photocellVal &gt;= 100) background(backgroundImg);<br>  else background(nightBackgroundImg);<br>  <br>  if (gameState === &quot;play&quot;) {<br>    bg.velocityX = -(4.0 * (potVal / 1024.0 + 0.5) + score / 10.0);<br>    obstaclesgroup.setVelocityXEach(-(5.0 * (potVal / 1024.0 + 0.5) + score / 10.0));<br>    bricksgroup.setVelocityXEach(-(4.0 * (potVal / 1024.0 + 0.5) + score / 10.0));<br>    if (bg.x &lt; 300) {<br>      bg.x = bg.width / 2;<br><br>    }<br>    mario.changeAnimation(&quot;mario&quot;, marioImg);<br>    for (i = 0; i &lt; bricksgroup.length; i++) {<br>      if (mario.isTouching(bricksgroup.get(i))) {<br>        score = score + 1;<br>        bricksgroup.get(i).destroy();<br>      }<br>    }<br>    if (score &gt; 0 &amp;&amp; score % 10 == 0) {<br>      checkPointSound.play();<br>    }<br>    console.log(mario.y);<br>    console.log(fsrVal+&quot;,&quot;+potVal+&quot;,&quot;+photocellVal);<br>    if (mario.y &gt; 215 &amp;&amp; fsrVal &gt; 30) {<br>      mario.velocityY = -(16 * fsrVal / 900.0);<br>      jumpSound.play();<br>    }<br>    mario.velocityY = mario.velocityY + 0.8;<br><br>    if (obstaclesgroup.isTouching(mario)) {<br>      gameState = &quot;end&quot;;<br>      dieSound.play();<br>    }<br><br>    obstacles();<br>    bricks();<br><br>  }<br>  if (gameState === &quot;end&quot;) {<br><br>    gameover.visible = true;<br>    restart.visible = true;<br>    bg.velocityX = 0;<br>    mario.velocityY = 0;<br>    mario.changeAnimation(&quot;collision&quot;, mario_collided);<br>    obstaclesgroup.setVelocityXEach(0)<br>    bricksgroup.setVelocityXEach(0)<br>    obstaclesgroup.setLifetimeEach(-1);<br>    bricksgroup.setLifetimeEach(-1);<br>  }<br>  if (mousePressedOver(restart)) {<br>    reset();<br>  }<br>  mario.collide(invisibleGround);<br>  drawSprites();<br>  fill(&quot;white&quot;);<br>  textSize(20);<br>  text(&quot;Score:&quot; + score, 300, 40);<br><br>}<br>function obstacles() {<br>  if (frameCount % 40 === 0) {<br>    var obstacle = createSprite(500, 230);<br>    obstacle.velocityX = -(5.0 * (potVal / 1024.0 + 0.5) + score / 10.0);<br>    obstacle.lifetime = 250;<br>    obstacle.addAnimation(&quot;obstacle&quot;, obstacle1);<br>    obstaclesgroup.add(obstacle);<br>  }<br>}<br><br><br>async function initSerial() {<br>  try {<br>    const port = await navigator.serial.requestPort();<br>    await port.open({ baudRate: 9600 });<br>    arduinoStatus = &quot;connected&quot;;<br><br>    const decoder = new TextDecoderStream();<br>    port.readable.pipeTo(decoder.writable);<br>    const reader = decoder.readable.getReader();<br><br>    // Use setTimeout to read outside p5&#39;s loop detection<br>    function scheduleRead() {<br>      reader.read().then(({ value, done }) =&gt; {<br>        if (done) return;<br>        if (value){<br>          inputBuffer += value;<br>          let lines = inputBuffer.split(&quot;\n&quot;);<br>          inputBuffer = lines.pop();<br>          <br>          for (let line of lines) {<br>            line = line.trim();<br>            let values = line.split(&quot;,&quot;);<br>            if(values[0] || values[0] == 0) fsrVal = values[0];<br>            if(values[1] || values[1] == 0) potVal = 1023-values[1];<br>            if(values[2] || values[2] == 0) photocellVal = values[2];<br>          }<br>        }<br>        scheduleRead(); // schedule next read<br>      });<br>    }<br>    scheduleRead();<br><br>  } catch (err) {<br>    arduinoStatus = &quot;error: &quot; + err.message;<br>  }<br>}<br><br><br>function bricks() {<br>  if (frameCount % 30 === 0) {<br>    brick = createSprite(500, Math.round(random(60, 100)));<br>    brick.velocityX = -(4.0 * (potVal / 1024.0 + 0.5) + score / 10.0);<br>    brick.lifetime = 180;<br>    brick.addImage(&quot;brick&quot;, brickImg);<br>    brick.depth = mario.depth;<br>    mario.depth = mario.depth + 1;<br>    bricksgroup.add(brick);<br>  }<br>}<br>function reset() {<br>  score = 0;<br>  obstaclesgroup.destroyEach();<br>  bricksgroup.destroyEach();<br>  gameState = &quot;play&quot;;<br>  gameover.visible = false;<br>  restart.visible = false;<br>}</pre><h4>Video</h4><p>Watch the sensor-controlled Mario game in action!</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0nuow4sbg2A&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0nuow4sbg2A%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/503aaa555a65466c74444223373866bb/href">https://medium.com/media/503aaa555a65466c74444223373866bb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2a6bb4b7baa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TUI Midterm Proposal]]></title>
            <link>https://medium.com/@seung-wook/tui-midterm-proposal-177c038b7bed?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/177c038b7bed</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 23:35:22 GMT</pubDate>
            <atom:updated>2026-09-28T20:30:46.621Z</atom:updated>
            <content:encoded><![CDATA[<h4>Adin Gilman-Cohen, Clay Lemar, Ethan (Seung-Wook) Hong, Eva Lu, Xin Zhou</h4><p>For our midterm proposal, we have generated three ideas to receive feedback on. These stemmed from our initial direction of building a compass that points towards a specific destination or other person. We are interested in the theme of the social element of navigation, whether that is navigating streets or a conversation.</p><h3><strong>1. Explicitizing subtle social interactions (silence during conversations / social battery drainage)</strong></h3><p>Imagine you are talking with another person and a silence occurs. Does it feel comfortable or tense? Do they perceive it the same way as you? Can we visualize the silence and how it’s perceived? This scenario sparked interest in the following situations:</p><h4><strong>Problem Situations</strong></h4><ul><li>During a conversation, you might often face a moment when you like your conversation partners and enjoy talking with them but the conversation stops awkwardly or silence occurs.</li><li>You don’t want to mess up the mood of the conversation but your social battery is drained and you want to go home.</li></ul><h4><strong>Current Solutions</strong></h4><ul><li>These situations occur quite often during social interactions, such as when meeting new friends, going on a first date, drinking with a big group of people. However, without explicitly telling or just awkwardly leaving the group, which feels pressuring, there is really no way to easily convey these feelings.</li><li>Eye contact may be one of the most effective ways to mitigate the tension. However, it is also silent and abstract, and it only happens between two people. More importantly, it can be misinterpreted.</li></ul><h4><strong>Proposed Solutions</strong></h4><p><strong>Input</strong></p><ul><li>A fidget toy that can make people feel comfortable while also having a button/slider or squeeze ball to signal their comfort with the conversation partner or social battery drainage<br>→ This lowers the pressure of signaling their feelings through the input device as others couldn’t really tell if the user is signaling or simply playing with the device</li><li>Biosignals such as heartbeat can also serve as input: the system can help comfortably explicitize the nervousness of the user in a socially acceptable way</li><li>Facial recognition captures people’s unconscious micro-expressions that reflect their current emotional state.</li><li>A microphone that listens to silences in a conversation</li></ul><p><strong>Output</strong></p><ul><li>Objects such as light orb / optical fiber / light pipe that can signal the group conversation mood with color and intensity</li><li>Sound that grows the longer a silence goes on, tone that indicates tension or comfort</li></ul><p><strong>Side Interactions to Consider</strong></p><ul><li>The object may enable a simple ambient game in case the users still want to interact with each other yet not want to talk</li><li>The object can suggest random related questions in case the users want to keep the conversation going but do not have any topics to talk about in their minds</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4c-uiO0SyTnKoFQJtmz-LA.png" /><figcaption><strong>Image 1: Flow chart of Silence Indicator</strong></figcaption></figure><h3><strong>2. Group bike ride coordinator with haptic feedback</strong></h3><p>When cyclists go on a group ride, people often spread out as they bike at different speeds and it is easy for the people at the back to get lost. This idea implements a haptic feedback system for the leader of a ride which uses vibration (or some other means) to alert the leader when someone has gotten too far behind.</p><p>This can also be useful when riders feel overwhelmed with the speed of the ride–which can be read through bio signals like heartbeat BPM–but feel socially pressured or uncomfortable to speak up about it.</p><h4>Key Points</h4><ul><li>Would integrate with phone GPS</li><li>Preset maximum distance allowable</li><li>Use a TUI to communicate with lead cyclist</li><li>Possibly integrate other input such as biometric data</li></ul><h3><strong>3. Proximity detector</strong></h3><p>It is a joy when you bump into a friend in public, but how often do we almost bump into a friend but not look over at the right moment? This idea proposes two objects (envision a stone held in the pocket) that indicates when it is close to its partner.</p><h4>Key Points</h4><ul><li>Each includes a gps or links to phone</li><li>Shows proximity though warmth, vibration, glowing etc</li><li>Could also be an ambient media lamp that displays data from “find my friends”</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=177c038b7bed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 3: Sensing with Potentiometers]]></title>
            <link>https://medium.com/@seung-wook/lab-3-sensing-with-potentiometers-4c82e47473b0?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c82e47473b0</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 21:28:19 GMT</pubDate>
            <atom:updated>2026-09-19T21:28:19.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IK5za2oboE5M1Syvah4l2A.png" /></figure><h4>Description</h4><p>In this lab, I used two potentiometers and LEDs to control the brightness and either the blinking duration or hue of the LEDs.</p><p>I connected the potentiometers to analog input ports A0 and A1, with VCC connected to 5V and GND to GND.</p><h4>Components Used</h4><ul><li>Arduino Uno</li><li>Breadboard</li><li>2 Potentiometers</li><li>3 LEDs &amp; 3 330Ω Resistors</li></ul><h4>Part 1: Blinking LEDs with Different Durations &amp; Brightness</h4><p>I wrote the code so that the left potentiometer controls the brightness and the right potentiometer controls the blinking duration. I realized that the map() function is very handy for handling analog inputs and mapping them to specific ranges of values.</p><pre>int redLedOut = 10;<br>int greenLedOut = 11;<br>int blueLedOut = 12;<br><br>int leftPotsIn = A0;<br>int rightPotsIn = A1;<br><br>void setup(){<br>  Serial.begin(9600);<br>  pinMode(redLedOut, OUTPUT);<br>  pinMode(greenLedOut, OUTPUT);<br>  pinMode(blueLedOut, OUTPUT);<br>}<br>void loop(){<br>  int leftPotsValue = analogRead(leftPotsIn);<br>  int rightPotsValue = analogRead(rightPotsIn);<br>  int brightness = map(leftPotsValue, 0, 1023, 255, 0);<br>  int blinkDuration = map(rightPotsValue, 0, 1023, 0, 3000);<br>  Serial.println(&quot;Left Pots: &quot; + String(leftPotsValue) + &quot;, Right Pots: &quot; + String(rightPotsValue) + &quot;  |  Setting brightness to: &quot; + String(brightness) + &quot; and blink duration to: &quot; + blinkDuration);<br><br>  setOutput(redLedOut, brightness);<br>  setOutput(greenLedOut, brightness);<br>  setOutput(blueLedOut, brightness);<br>  delay(blinkDuration);<br><br>  brightness = 0;<br>  setOutput(redLedOut, brightness);<br>  setOutput(greenLedOut, brightness);<br>  setOutput(blueLedOut, brightness);<br>  delay(blinkDuration);<br>}<br>void setOutput(int pin, int level){<br>  if(level &lt; 0) level = 0;<br>  else if(level &gt; 255) level = 255;<br>  analogWrite(pin, level);<br>}</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCx8OZKHno90%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCx8OZKHno90&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCx8OZKHno90%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d49c9e7b7377139ad5cc7faa95ac443/href">https://medium.com/media/2d49c9e7b7377139ad5cc7faa95ac443/href</a></iframe><h4>Part 2: Controlling the Hue and Brightness of LEDs</h4><p>I wrote the code so that the left potentiometer controls the brightness and the right potentiometer controls the hue.</p><pre>int redLedOut = 10;<br>int greenLedOut = 11;<br>int blueLedOut = 12;<br><br>int leftPotsIn = A0;<br>int rightPotsIn = A1;<br><br>void setup(){<br>  Serial.begin(9600);<br>  pinMode(redLedOut, OUTPUT);<br>  pinMode(greenLedOut, OUTPUT);<br>  pinMode(blueLedOut, OUTPUT);<br>}<br>void loop(){<br>  int leftPotsValue = analogRead(leftPotsIn);<br>  int rightPotsValue = analogRead(rightPotsIn);<br>  int brightness = map(leftPotsValue, 0, 1023, 255, 0);<br>  int hue = map(rightPotsValue, 0, 1023, 360, 0);<br>  Serial.println(&quot;Left Pots: &quot; + String(leftPotsValue) + &quot;, Right Pots: &quot; + String(rightPotsValue) + &quot;  |  Setting brightness to: &quot; + String(brightness) + &quot; and hue to: &quot; + hue);<br><br>  int r, g, b;<br>  hueAndBrightnessToRGB(hue, brightness, r, g, b);<br>  setOutput(redLedOut, r);<br>  setOutput(greenLedOut, g);<br>  setOutput(blueLedOut, b);<br>}<br>void setOutput(int pin, int level){<br>  if(level &lt; 0) level = 0;<br>  else if(level &gt; 255) level = 255;<br>  analogWrite(pin, level);<br>}<br>void hueAndBrightnessToRGB(float hue, int brightness, int &amp;r, int &amp;g, int &amp;b) {<br>  float x = hue / 60.0;<br>  float v = brightness / 255.0;<br><br>  if (hue &lt; 60) {<br>    r = 255;<br>    g = x * 255;<br>    b = 0;<br>  }<br>  else if (hue &lt; 120) {<br>    r = (2 - x) * 255;<br>    g = 255;<br>    b = 0;<br>  }<br>  else if (hue &lt; 180) {<br>    r = 0;<br>    g = 255;<br>    b = (x - 2) * 255;<br>  }<br>  else if (hue &lt; 240) {<br>    r = 0;<br>    g = (4 - x) * 255;<br>    b = 255;<br>  }<br>  else if (hue &lt; 300) {<br>    r = (x - 4) * 255;<br>    g = 0;<br>    b = 255;<br>  }<br>  else {<br>    r = 255;<br>    g = 0;<br>    b = (6 - x) * 255;<br>  }<br>  r *= v;<br>  g *= v;<br>  b *= v;<br>}</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F04QlRauPzEg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D04QlRauPzEg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F04QlRauPzEg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb8b6d209e6a5155a60fbaf1f1b775b6/href">https://medium.com/media/eb8b6d209e6a5155a60fbaf1f1b775b6/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c82e47473b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 2: Arduino I/O with Serial Input]]></title>
            <link>https://medium.com/@seung-wook/lab-2-arduino-i-o-with-serial-input-c501fb12ea24?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/c501fb12ea24</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 09:11:52 GMT</pubDate>
            <atom:updated>2026-09-14T09:11:52.504Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CkvKilPJ2aS07SUJ2bHLow.png" /></figure><p>In this lab, a serial input component was added so that the LEDs could be controlled using keyboard input.</p><h4>Creating the Diffuser</h4><p>Since I had already created a wooden light cover for the LEDs, I added a thin layer of paper inside the cover to serve as a diffuser.</p><p>Check out my process of creating the wooden cover <a href="https://medium.com/@seung-wook/lab-1-christmas-tree-with-arduino-leds-ad239566b656">here</a>.</p><h4>Programming RGB Value Changes Depending on the Number of Key Presses</h4><p>I added the levels array and the increaseOutput function to increment the RGB values by 50 at a time and return them to 0 when they exceed 255.</p><pre>int redLedOut = 10;<br>int greenLedOut = 11;<br>int blueLedOut = 12;<br><br>int levels[3] = {0, 0, 0};<br><br>void setup(){<br>  Serial.begin(9600);<br>  pinMode(redLedOut, OUTPUT);<br>  pinMode(greenLedOut, OUTPUT);<br>  pinMode(blueLedOut, OUTPUT);<br>}<br>void loop(){<br>  Serial.println(&quot;Awating command...&quot;);<br>  while(!Serial.available()){}<br>  String inputStr = Serial.readString();<br>  inputStr.trim();<br>  char colorCode = inputStr[0];<br>  int targetOutPin;<br>  bool errorFlag = false;<br>  switch(colorCode){<br>    case &#39;r&#39;:<br>      targetOutPin = redLedOut;<br>      Serial.print(&quot;Setting RED to &quot;);<br>      break;<br>    case &#39;g&#39;:<br>      targetOutPin = greenLedOut;<br>      Serial.print(&quot;Setting GREEN to &quot;);<br>      break;<br>    case &#39;b&#39;:<br>      targetOutPin = blueLedOut;<br>      Serial.print(&quot;Setting BLUE to &quot;);<br>      break;<br>    default:<br>      Serial.print(&quot;Incorrect color code: &quot;);<br>      Serial.println(colorCode);<br>      errorFlag = true;<br>  }<br>  if(!errorFlag){<br>    increaseOutput(targetOutPin);<br>  }<br>}<br><br>void increaseOutput(int pin){<br>  levels[pin-10] += 50;<br>  if(levels[pin-10] &gt; 255) levels[pin-10] = 0;<br>  setOutput(pin, levels[pin-10]);<br>  Serial.println(levels[pin-10]);<br>}<br>void setOutput(int pin, int level){<br>  if(level &lt; 0) level = 0;<br>  else if(level &gt; 255) level = 255;<br>  analogWrite(pin, level);<br>}</pre><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLX6u_d--nVc&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLX6u_d--nVc%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7f28cc184b0bad05f8ac5278a722e80/href">https://medium.com/media/c7f28cc184b0bad05f8ac5278a722e80/href</a></iframe><h4>Programming RGB Value Changes Based on Hue Input</h4><p>Using the <a href="https://www.rapidtables.com/convert/color/hsl-to-rgb.html">HSL to RGB formula</a>, I created the hueToRGB() function so that when a user inputs a hue value ranging from 0 to 360, the color is set to the most saturated color at that hue.</p><pre>int redLedOut = 10;<br>int greenLedOut = 11;<br>int blueLedOut = 12;<br><br>void setup(){<br>  Serial.begin(9600);<br>  pinMode(redLedOut, OUTPUT);<br>  pinMode(greenLedOut, OUTPUT);<br>  pinMode(blueLedOut, OUTPUT);<br>}<br>void loop(){<br>  Serial.println(&quot;Awating command...&quot;);<br>  while(!Serial.available()){}<br>  String inputStr = Serial.readString();<br>  inputStr.trim();<br>  int hueInput = inputStr.toInt();<br>  int r, g, b;<br>  Serial.print(&quot;Setting hue to &quot;);<br>  Serial.println(hueInput);<br>  hueToRGB(hueInput, r, g, b);<br>  setOutput(redLedOut, r);<br>  setOutput(greenLedOut, g);<br>  setOutput(blueLedOut, b);<br>}<br>void setOutput(int pin, int level){<br>  if(level &lt; 0) level = 0;<br>  else if(level &gt; 255) level = 255;<br>  analogWrite(pin, level);<br>}<br>void hueToRGB(float hue, int &amp;r, int &amp;g, int &amp;b) {<br>  float x = hue / 60.0;<br><br>  if (hue &lt; 60) {<br>    r = 255;<br>    g = x * 255;<br>    b = 0;<br>  }<br>  else if (hue &lt; 120) {<br>    r = (2 - x) * 255;<br>    g = 255;<br>    b = 0;<br>  }<br>  else if (hue &lt; 180) {<br>    r = 0;<br>    g = 255;<br>    b = (x - 2) * 255;<br>  }<br>  else if (hue &lt; 240) {<br>    r = 0;<br>    g = (4 - x) * 255;<br>    b = 255;<br>  }<br>  else if (hue &lt; 300) {<br>    r = (x - 4) * 255;<br>    g = 0;<br>    b = 255;<br>  }<br>  else {<br>    r = 255;<br>    g = 0;<br>    b = (6 - x) * 255;<br>  }<br>}</pre><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dju3JNlW5m0A&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fju3JNlW5m0A%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c981b9eaa795869d415624dc13714cf/href">https://medium.com/media/3c981b9eaa795869d415624dc13714cf/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c501fb12ea24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab 1: Christmas Tree with Arduino LEDs]]></title>
            <link>https://medium.com/@seung-wook/lab-1-christmas-tree-with-arduino-leds-ad239566b656?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad239566b656</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 06:43:25 GMT</pubDate>
            <atom:updated>2026-09-05T07:08:31.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GAGL756s1tkx6BiBA-HHng.png" /><figcaption>My Christmas tree mood lamp made with an Arduino-based circuit and laser-cut plywood.</figcaption></figure><p>What do colorful LEDs make you think of?</p><p>For me, they bring back memories of the Christmas tree lights from my childhood. For the first lab assignment — to light up LEDs — I decided to turn that simple exercise into a small Christmas tree mood lamp.</p><h4>Components</h4><ul><li>1 Arduino UNO R4 Minima</li><li>1 Breadboard</li><li>3 LEDs (Red, Green, Blue)</li><li>3 Resistors (220Ω)</li><li>4 Wires</li><li>Plywood, Glue Gun</li></ul><h4>Configuring the Circuit</h4><p>The first lab assignment for the <em>Theory and Practice of Tangible User Interfaces</em> course was to make LEDs blink using an Arduino board.</p><p>I connected the anodes of the three LEDs to Arduino digital I/O pins 10, 11, and 12, and connected their cathodes to 220Ω resistors, which were then connected to GND. Before building the physical circuit, I used Tinkercad to simulate the setup and make sure everything was wired correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n96WgLS-w9a2FWYEx6CtFQ.png" /><figcaption>Running a Tinkercad simulation to check the circuit configuration.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6bkMH3SE1EM0sv1oeRXclw.png" /><figcaption>Circuit schematic (created in Tinkercad)</figcaption></figure><h4>Programming</h4><p>I wanted the Christmas tree lights to have different illumination modes, similar to the lights I remember from Christmas trees which had blinking and non-blinking modes, and also allowed different combinations of colors.</p><p>To make this flexible, I represented each lighting pattern as an N × 3 matrix, where each row represents one state of the three LEDs:</p><pre>int led_r = 10;<br>int led_g = 11;<br>int led_b = 12;<br><br>// cmy pattern<br>int pattern1[3][3] = {<br>  {0, 1, 1},<br>  {1, 0, 1},<br>  {1, 1, 0}<br>};<br><br>// rgb pattern<br>int pattern2[3][3] = {<br>  {1, 0, 0},<br>  {0, 1, 0},<br>  {0, 0, 1}<br>};<br><br>// rgbcmyw pattern<br>int pattern3[7][3] = {<br>  {1, 0, 0},<br>  {0, 1, 0},<br>  {0, 0, 1},<br>  {0, 1, 1},<br>  {1, 0, 1},<br>  {1, 1, 0},<br>  {1, 1, 1}<br>};<br><br>int (*selectedPattern)[3];<br>int patternLength;<br>int currentPatternIdx;<br>bool blink;<br>int delayTime;<br><br>void setup() {<br>  // put your setup code here, to run once:<br>  pinMode(led_r, OUTPUT);<br>  pinMode(led_g, OUTPUT);<br>  pinMode(led_b, OUTPUT);<br>  selectedPattern = pattern3;<br>  patternLength = sizeof(pattern3) / sizeof(pattern3[0]);<br>  currentPatternIdx = 0;<br>  blink = true;<br>  delayTime = 100;<br>}<br><br>void loop() {<br>  // put your main code here, to run repeatedly:<br>  executePattern(selectedPattern, currentPatternIdx % patternLength);<br>  currentPatternIdx++;<br>  if(currentPatternIdx &gt;= patternLength) currentPatternIdx = 0;<br>  delay(delayTime);<br>  if(blink){<br>    turnOffAll();<br>    delay(delayTime);<br>  }<br>}<br><br>void executePattern(int pattern[][3], int idx){<br>  int* currentPattern = pattern[idx];<br>  digitalWrite(led_r, currentPattern[0]);<br>  digitalWrite(led_g, currentPattern[1]);<br>  digitalWrite(led_b, currentPattern[2]);<br>}<br><br>void turnOffAll(){<br>  digitalWrite(led_r, LOW);<br>  digitalWrite(led_g, LOW);<br>  digitalWrite(led_b, LOW);<br>}</pre><p>The <em>executePattern()</em> function reads each state and turns the corresponding LEDs on or off. I also made the delay duration and blinking behavior configurable through variables, so I could experiment with different lighting effects without changing the main logic.</p><h4>Laser-Cutting the Plywood</h4><p>Since I had recently started learning laser cutting, I wanted to create a lampshade experimenting the technique I learned.</p><p>I decided to use a living hinge structure and designed a frustum-shaped piece of plywood with ornament-shaped holes. The holes would let the colored LEDs shine through the surface and create the appearance of Christmas tree ornaments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TDcCbGGYH67ojgtFuTnRQ.png" /><figcaption>The final laser-cutting plan.</figcaption></figure><p>This process involved quite a bit of trial and error. I initially tried to make the decoration as small as possible so that it would fit neatly around the breadboard. However, after breaking several prototypes, I realized that the plywood thickness placed a practical limit on how small I can make the structure.</p><p>I also noticed that the ornament holes close to the seams on the bottom were the vulnerable parts. In later iterations, I moved the holes more toward the bottom to make the structure more robust.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5kfav5lJlKJ_UV69dzQ8Q.jpeg" /><figcaption>Multiple trial and errors leading to the final plywood piece.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7j-P1C2TUaNHMJCy7MmTQg.jpeg" /><figcaption>The final model being laser-cut.</figcaption></figure><p>After several iterations, I arrived at a size and layout that were both structurally durable enough and compact enough for the circuit. I then assembled the final piece using a glue gun. You can see how it works in the videos below:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ft-Q-qoxVtKQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2Ft-Q-qoxVtKQ%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ft-Q-qoxVtKQ%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fded9c5b4dcceb579f0e095b75a87027/href">https://medium.com/media/fded9c5b4dcceb579f0e095b75a87027/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8ric2Ww-Ivs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2F8ric2Ww-Ivs%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8ric2Ww-Ivs%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3db5c7b0b913ed874fbf49a266cf83f/href">https://medium.com/media/b3db5c7b0b913ed874fbf49a266cf83f/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad239566b656" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About Myself]]></title>
            <link>https://medium.com/@seung-wook/about-myself-b5da0900d613?source=rss-67a7fdaf3550------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5da0900d613</guid>
            <dc:creator><![CDATA[Ethan Hong]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 06:39:22 GMT</pubDate>
            <atom:updated>2026-09-04T06:39:22.047Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! I’m Ethan Hong, a 2027 MDes (Master of Design) student at UC Berkeley. I’m passionate about creating a society where the benefits of technology are accessible to everyone. My interests lie at the intersection of UX Design, Human-AI Interaction, and Inclusive Design.</p><h3>Academic Background</h3><p>I studied <strong>Computer Science &amp; Engineering</strong> and <strong>Human-Computer Interaction (HCI) &amp; Design</strong> at Seoul National University in Korea. HCI &amp; Design was a student-designed major that I created, which allowed me to explore diverse fields related to human-computer interaction, including Computer Science, Information Science, Design, and Psychology. I also spent one semester as an exchange student at the Georgia Institute of Technology.</p><h3>Previous Projects</h3><p>I have worked on several design-thinking-based projects, with a particular focus on inclusive design.</p><p>For the <strong>Seoul Subway Information System Redesign</strong> project, my team conducted user research with people from diverse age groups, foreign visitors, and people with visual impairments. Based on our research findings, we developed a subway information design framework and redesigned both a universal subway guide app and a universal subway signage to provide the right information at the right moment for everyone.</p><p>I also explored the use of LLMs to help instructors diversify and customize their course materials based on the principles of Universal Design for Learning (UDL), with the goal of creating a more inclusive and immersive learning experience.</p><p>Building on these experiences, I’m interested in designing tangible systems that help people with diverse accessibility needs navigate routes and public transportation facilities. I’m also interested in creating educational games that make learning more engaging and enjoyable for students. At the same time, as someone who is relatively new to the field of TUI, I’m excited to explore a wide range of topics and discover new areas of interest through this class.</p><h3>Object that I’m Excited About</h3><p>One of my hobbies is visiting architecturally interesting buildings and studying architecture. Buildings have always fascinated me because they are unique objects whose affordances exist both on the outside and the inside. Facades play an important role in shaping cityscapes at a larger scale, while interiors influence how we live and how we perceive the world around us.</p><p>I believe that within the spaces and structures of buildings, there are many opportunities for Human-Centered Design and digital technology to transform and enhance our experiences. I’m excited to explore these possibilities and hope that this class will inspire me to think about how tangible and digital systems can interact with the built environment in new ways.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5da0900d613" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>