Week 4 / Exploring Arduino

Getting Started with Arduino

This week was about putting structure in place for my dissertation, while also beginning to make something physical. I started working with Arduino to move ideas out of the abstract, and into hands-on experimentation, using simple inputs and outputs to test how interaction and systems might be expressed materially. I also picked up additional modules such as a camera, button, and OLED display. These components will be useful for the kinds of interactive Arduino-based experiments I want to develop moving forward.

Arduino tools
SuperKit Arduino

Joystick + LC Testing

Joystick, LCD, Breadboard Arduino

A case of me trying to fly before I could walk. Instead of first testing whether the joystick input worked on its own, I attempted to make the joystick and LCD screen function together. When the LCD failed to work, it highlighted how under-skilled I currently am with Arduino. I went back to the basics and focused on printing joystick values to the serial console to properly test and understand how the joystick behaves.

Joystick Testing

Joystick and R3 Board Arduino

After the failed attempt at trying to integrate multiple components, I focused on getting the joystick to work on its own. Instead of trying to make everything work, I tested the joystick by printing its values to the Arduino serial console as it was moved or pressed.

Component Joystick Arduino Purpose
X-axis VRx A0 Reads horizontal joystick movement (left / right).
Y-axis VRy A1 Reads vertical joystick movement (up / down).
Button SW A2 Detects joystick press input. Using INPUT_PULLUP:
pressed = on,
not pressed = off.
Power +5V 5V Supplies power to the joystick module.
Ground GND GND Ground reference for stable signal readings.

OLED Print Text

OLED Module and R3 Board Arduino

Next, I tested the OLED display as a basic visual output surface by rendering a single line of text ("HELLO") using I2C communication between the Arduino Uno and a 0.96' OLED screen. The Arduino sends data via the I2C protocol (SDA/SCL), which OLED interprets and renders as pixels. I was so excited when I saw the word appear on the screen. It felt like the system "speaks". It is a small but critical step toward my later experiments where outputs are shaped by user input and repetition.

Component OLED Arduino Purpose
Power VCC 5V Supplies power to the OLED display module.
Ground GND GND Shared ground reference for stable communication.
I2C Data SDA A4 Transfers display data from the Arduino to the OLED via I2C.
I2C Clock SCL A5 Synchronises data transmission timing for I2C communication.

Simple Animation

OLED Module and R3 Board Arduino

To explore the OLED display not as a static output surface, I iterated the earlier tests by introducing animation through a simple growth sequence where a single square gradually multiples into five. Rather than appearing all at once, each square emerges sequentially, emphasising duration, pacing, and accumulation. The animation is driven by a timing loop using millis(), allowing the system to update the display incrementally without freezing. This transformed the OLED from a passive display into an active, time-based feedback interface.

Component OLED Arduino Purpose
Power VCC 5V Supplies power to the OLED display for continuous animation output.
Ground GND GND Shared ground reference ensuring stable display communication.
I2C Data SDA A4 Sends animation frame data from the Arduino to the OLED display.
I2C Clock SCL A5 Synchronises timing for sequential frame updates in the animation.
Square Generator drawRect() OLED drawing function Renders each square as a geometric unit, visually representing an individual data instance.
Growth Logic Stage counter millis() timing Controls when new squares appear, simulating gradual accumulation rather than instant output.
Layout System Fixed positions Center + cardinal offsets Organises the five squares spatially, reinforcing a structured and predictable growth pattern.

Challenges Faced

OLED Module and R3 Board Arduino

I had so much trouble working with the Arduino. When I was trying to make the LCD work, there was extensive wiring and the wires kept falling out. I was confused about the calibration, how to ground share, power distribute, and different component pin functions. I kept having to seek ChatGPT's help on how to set everything up. Although I managed to get the simple outputs to work, I have to work on trying to make both the joystick and LCD work. In the near future, I will also be planning to add in a camera module... I am scared.





p5.js x Arduino

Moving beyond Arduino itself, I explored how physical inputs can be extended into a computational visual environment using p5.js. Physical inputs are translated into numerical data streams that drive dynamic, screen-based visuals. Multple components were tested as inputs during this process. These inputs were not used to trigger fixed outcomes, but to continuously influence visual behaviour, allowing the system to respond gradually rather than discretely. This approach shifts the interaction from simple cause-and-effect toward feedback-based relationships, where physical actions shape visual tendencies such as attraction, repulsion, growth, or dispersion over time.

Ultrasonic Sensor Testing

Ultrasonic Sensor and R3 Board Arduino

Before integrating the sensor into more complex visual systems, I conducted a simple Arduino test to confirm that distance measurements could be accurately captured and interpreted. The sensor was connected to the Arduino Uno, and its readings were output directly to the Serial Monitor as numerical values representing distance in centimetres.

Component Ultrasonic Arduino Purpose
Power VCC 5V Supplies power to the ultrasonic sensor for distance measurement.
Ground GND GND Provides a shared ground reference required for accurate signal timing.
Trigger Signal Trig A3 Sends a short pulse to initiate an ultrasonic distance measurement.
Echo Signal Echo A4 Receives the reflected ultrasonic pulse and is used to calculate distance based on time delay.

Input to Output

Ultrasonic Sensor and R3 Board Arduino

In this mini experiment, the ultrasonic sensor measures the distance in real time and sends numerical values from Arduino to p5.js via USB. In p5.js, these values are continuously read and mapped to visual parameters rather than triggering fixed events.

Shorter distances causes circles to move closer together, creating attraction. While larger distances push them apart, producing repulsion. This transition turns bodily proximity into a behavioural rule that unfolds over time. The system operates as a feedback loop where physical movement influences visual tendencies rather than producing disrcrete, instantaneous outputs.

Component System UI Connection Purpose
Microcontroller Arduino Uno R3 USB cable Reads physical sensor input and sends numerical data to the computer via serial communication.
Sensor Data Ultrasonic distance value Serial.println() Transmits real-time distance measurements from Arduino to p5.js as a continuous data stream.
Serial Protocol USB Serial (9600 baud) Serial.begin(9600) Defines the communication speed and format for data exchange between Arduino and p5.js.
Browser Interface p5.js (Web Serial) navigator.serial Requests access to the Arduino’s serial port and receives incoming sensor data.
Data Parsing JavaScript buffer TextDecoder + newline split Converts raw serial bytes into readable numerical values usable by the visual system.
Visual Output p5.js canvas Mapped distance values Translates physical distance into visual behaviour (attraction or repulsion of circles).
Ultrasonic Sensor → Arduino Demo

Future Considerations

Sensor Selection and Technical Considerations

The ultrasonic sensor functions within 305cm. It uses two "eyes", one emits sound waves, while the other receives the reflected signal, calculating distance based on time travel. However, since it relies on sound, obstructing the speaker affects its accuracy. As an alternative, a photoresistor performs well at close distances and allow near-contact interaction. An infrared sensor would be a better option as it provides proximity data without relying on sound transmission.


Hardware Limitations

Using a camera directly with Arduino was not recommended as Arduino Boards are not designed to process camera data efficiently. For camera-based systems or higher computational demands, Raspberry Pi or ESP boards would be more suitable. Similarly, LCD screens connected to Arduino have low frame rates.


System Integration

If higher processing power is required, combining Arduino with a laptop is a viable approach, The laptop can handle computation and visuals while Arduino manages sensor input. For exhibition purposes, the laptop can be concealed and connected via longer cables to maintain a clean presentation setup.


Conceptual Direction

After consultation, I realised the importance of clarifying the concept before selecting components. Without a clear idea, hardware decisions become arbitrary and difficult to manage. When working with Arduino, simplicity is key. Limit the system to one or two components, with a maximum of three, to maintain clarity, stability, and conceptual focus.