# Week 13 assignment page creation _Exported on 12/8/2025 at 08:50:05 EST from Cursor (2.1.39)_ --- **User** general guidelines: — for each image or video add a caption and description. — make all the text professional and succinct without losing key details — make the information as organized and as aesthetically pleasing as possible — don't just take my notes from the prompt, refine it before putting it on the page tasks: 1. make a copy of week12.html and called it week13.html. make sure its linked on index.html. populate the relevant resources from https://academy.cba.mit.edu/classes/wildcard/index.html in Useful Documentation, add a new subsection in Useful Documentation with all these references Refs datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny1624-26-27-DataSheet-DS40002234A.pdf pinout https://www.tindie.com/products/leonerd/attiny1626-development-board/ https://www.avrfreaks.net/s/topic/a5C3l000000UkLGEA0/t191222 course resources https://academy.cba.mit.edu/classes/embedded_programming/index.html ATtiny412 t412-blink-4 pin pro sch pcb board components traces interior blink.ino t412-blink-3 pin board components traces mask traces+exterior interior blink.ino blink.c make video t412-blink-2 pin board components traces traces+exterior interior blink.ino video ring.ino t412-echo board componenets traces traces+exterior interior echo.ino video echo.c echo.make video https://academy.cba.mit.edu/classes/embedded_programming/t412/hello.t412.echo.png 2. add lecture and recitation notes from this week as two sections week13 lecture notes my theme of the week ‘step away from the panic’ major announcements do subject evaluation required for funding the class feedback to the institute about the class if you care about successors in the class calendar alarm — wildcard week and recitation on why make (almost) anything: impact friday is cutoff for assignments and orders 10s of dollars per person from inventory then final presentation/final exam combining multiple additive and subtractive processes (not just design a board and 3d print a case) goal is system integration out of parts final exam is did you finish a final project and does it do something and does it work 1) did you integrate and design a complete system 2) can you demo a final project? here is the cool thing I did and here is how it works 3) make a final project video! (helps but not required) -> focus on well-integrated device! review of week12 user interfaces claire wang music play and windows 3.1 interface works! ryan hoffman drv8251a discussion, heat sinks, breakout boards wildcards with waterjetting, edm, multi-axis machining, laser cutting metal class in the spring on nature of mathematical modeling srikanth nadhamuni background and experience to visiting fellow at mit raspberry pi w for wifi, n8n for cloud LLM data crunching software: node.js, mcp bridge server with n8n based on bridge connected to device (NGV tunnel) all set! fantastic experience, haven’t worked so hard in a very long time and learning a lot of new things hope to take forward and build other systems the whole culture of doing and trying yourself fascinating, especially with failing a number of times until you figure it out maybe set one up at an IIT in India or AI centers of excellence with education ministry into the Indian education system (see fablabkerala.in or vigyam ashram) ray song not here tyler jensen (Lincoln lab, group 81) final project discussion nylon printer week 13 easy for web serial interface for XIAO! web server to TFT (I think I forgot to load the camera pins with my code for it) aditi ramakrishnan sloan mba and strategy consulting background discrete time filter (fft is blown) in skimage.filters — make a bandpass filter, then run a series of these filters, much less computing only adds and multiplies for filtering in realtime alexandros gravalos not here edward chen check final watch project by gulati into watch form factor clear print on the form labs printer, 0.1 Kaman filter for sensor fusion (in the spring class) for position — lsm6dsv16x from input devices acceleration at 7 khz (at audio frequency) show and tell handle to sensor wifi user interface plug to audio llm user interface system integration reminders mount electronics strain relief the final projects preview for wildcard week assignment design and produce something with a digital process week13 recitation notes — why make (almost) anything map of fablabs why make a fablab used to create a community building things for the community sustainability prototyping quickly how impact? how to make spaces how to measure impact what is important about fab fablabs in cities vs rural areas the ability to decide their own futures and change their lives fundamentally ‘safecast revolutionized citizen science’ e.g. radiation map bringing back manufacturing reducing reliance on supply chains rural sustainability working with indigenous communities on creating technologies themselves at scale and measure their usefulness and efficacy to preserve their ancestral knowledge how to establish labs their how to make sure the labs get used hygiene technologies with proctor and gamble highly commercial lots of plastic waste how can we change how they produce? how to make their products get there through resellers? trip to peru and ran workshops, questionnaires, analysis collaboration developed into how to produce the products but also how to test their products to be market valuable e.g. mosquito repellents out of three plants, two worked better and one wasn’t working at all (which is important to know!) what does it mean to design infrastructure? what did we want this lab to be able to do? workshops and questionnaires how much you educate people based on the info they have with the issues the community is facing energy concerns to consider, some machines just drain the grid and can’t be used solar powered, battery powered machines, reducing energy consumption of machines many concerns important ethical questions how to maintain resources case study water purifier packets, use them, change them, source them locally, ingredients found locally, how to distribute them globally first few fablabs were nsf funded now corporate csr, regional funding, labor funding (10 different ways) successful fablabs are heterogeneous with lots of ways of funding the ones that fail usually just have one sponsor example DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too) what does it mean to scale infrastructure? (besides a lot of meetings!) what is a reasonable way to design a data collection process about what is needed and how to achieve it back to the map: expansion timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy initial results from boston how to confront local impact collab with university of hamburg motivation for how much food can be produced in Boston where food waste goes and what Boston produces locally make things for yourself locally impact directly in the community you’re living in hatchspace focused on rehabilitation of addicts with woodworking (vermont is wood producing state) example course program all-in session and systemic impact natural and cultural context skills and workshop economic vitality skills and workshop co-work session solutionspalooza in the course, hands-on component (no physical robot exists that can do it) and community component is also important inclusion is important solving unconscious and institutional biases ‘fabrica! lab’ — creating new laboratory spaces for female high school students, courses aimed for women in technology, online advising sessions for females interested in tech makerspaces — access to tools behind closed doors at universities, makes a huge difference for people who don’t have the ability to prototype for themselves materiom — fablab affiliated project on organic waste for biomaterials fablab león skylab workshop experiment — how to run a noodle shop out of a fablab (creating food from the community) academany — global distributed campus for high school education fablab all-in (belonging, impact, community), fab futures (future vocational skills), bio academy (synthetic biology), fabricademy (textiles, fab, bio), fab academy (digital fab apps and implications) trade-off between impactful and dangerous people could be doing bad, but not because doing it with a group people with values questions clarification: adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs) foundations for fab futures July 27-31, 2026 at fab boston 2026 3. update design files section to include either a link to a previous or upload a new folder from here. ATtiny_QFN folder and zip RP2354A-dev-v1.1 folder and zip for each put the images ATtiny1626-dev and ATtiny1626-dev-final RP2354A-dev 4. make individual and group assignment sections based on the assignment descriptions: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment, documenting the requirements that your assignment meets, and including everything necessary to reproduce it. Possibilities include (but are not limited to): 5. for the individual assignment, summarize week13 pcb engraving assignment tool carvera first for edge cuts and machine the holes (too much for the laser) fiber laser cutter for pcb engraving boards simple: ATtiny1626-dev complex: RP2354A-dev datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny1624-26-27-DataSheet-DS40002234A.pdf pinout https://www.tindie.com/products/leonerd/attiny1626-development-board/ https://www.avrfreaks.net/s/topic/a5C3l000000UkLGEA0/t191222 course resources https://academy.cba.mit.edu/classes/embedded_programming/index.html ATtiny412 t412-blink-4 pin pro sch pcb board components traces interior blink.ino t412-blink-3 pin board components traces mask traces+exterior interior blink.ino blink.c make video t412-blink-2 pin board components traces traces+exterior interior blink.ino video ring.ino t412-echo board componenets traces traces+exterior interior echo.ino video echo.c echo.make video https://academy.cba.mit.edu/classes/embedded_programming/t412/hello.t412.echo.png board design top and bottom for connectors, right side for flashing connectors along the edges to minimize form factor and maximize usage of space vertical connectors instead of horizontal connectors because the horizontal connectors risk being snapped avoid large black because laser does not work with that (keep traces closer and further to minimize black*) put connectors on 100mil spacing grid size for breadboardability *note — need to characterize maximum black until it burns the board because dumping too much heat in one place) missed six pins in initial design so switched from 6-pin headers to 9-pin (distributed six on top of bottom) no sda or scl resistors so we don’t regret it when we need the board for something else (maybe adding a spot for zero-ohm or pull-up resistor later but keeping it simple for now) adding aligned mounting holes (M3 usually — for 3mm screws) update footprint after editing the footprint (we had different x coordinates across the pins and needed to modify the footprint) rounded edge cuts — do 90 degrees, copy, drag, and complete the shape! design rules 0.1 mm spacing 0.15 mm trace width minimum 0.15mm clearance between plane and the rest ports and pins pa (0-7) pb (0-7) pc (0-7) 8-bit microcontroller, 8 pins max, each port has 8 pins maximum (some less) need to specify port letter and pin number postprocessing add new layer with just the holes in photoshop for carvera (only holes) get rid of the holes for the f2 tools engraving in inkscape (the frame and the board for alignment, then only engrave the board, not the edges) carvera machining mods -> mill 2d pcb 0.12mm cut depth and max depth pcb engraving xtool f2 ultra tape for laser alignment run a test first on spare copper before the carvera cut board to make sure focus is good (2.7mm thickness setting worked, board is actually 1.6-1.7mm thick) sand after worked with bantam tools fr1 (not the random amazon copper) short circuit test soldering using solder gun (heat gun) components 1x 6-pin flipflop headers 2x 9-pin flipflop headers 1x 4.7k resistor 1x 1k resistor 1x LED 1x 1uF or 10uF capacitor make sure to address everything in the assignment description: individual assignment: write an application that interfaces a user with an input &/or output device that you made include how the application interfaces with a user through an input and/or output device, then make a table with first column how it interfaces with the user, then column for input device(s), then column for output devices, make a row for a and a row for b add links to download all the relevant design files when you mention them embed all the relevant images and videos with the text design: ATtiny1626-dev-final engraving: ATtiny1626-dev-engraved soldered: ATtiny1626-dev-soldered blinking: ATtiny1626-dev-blinking 6. make sure there are no weird remnants from copying week11.html to week12.html --- **Cursor** Reviewing the existing files to understand the structure. Reading week12.html in sections to understand its structure: Reading more sections to understand the structure: Creating the initial todo list and starting week13.html: Copying week12.html to week13.html, then updating it: Updating week13.html, starting with the title and header: ```html
Interface & Application Programming
Key captures from the group and individual assignments with links to their sections.
This week focuses on creating user interfaces and applications that connect users with input and output devices. We'll explore interface design patterns, application programming techniques, and how to build interactive systems that provide meaningful user experiences.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on creating user interfaces and applications that connect users with input and output devices. We'll explore interface design patterns, application programming techniques, and how to build interactive systems that provide meaningful user experiences.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on creating user interfaces and applications that connect users with input and output devices. We'll explore interface design patterns, application programming techniques, and how to build interactive systems that provide meaningful user experiences.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Training materials and documentation for interface and application programming.
No recitation this week.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for interface and application programming.
Interface and Application Programming - MIT Academy
Comprehensive resource covering interface design, application programming, GUI frameworks, embedded UI development, web interfaces for embedded systems, and user interaction patterns. Includes detailed tutorials, code examples, and implementation guides for various interface programming tools and frameworks.
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the group and individual assignments with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Write an application that interfaces a user with an input &/or output device that you made. This assignment demonstrates three interface applications: (a) a simple button user interface on OLED, (b) a real-time graphical user interface through OLED and Wi-Fi for pulse oximeter readings, and (c) a Wi-Fi grip strength monitor with a mechanical gripper and age-estimation web dashboard.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
A mode-based user interface system that interfaces users with multiple input and output devices through a simple button press interface. The system provides visual feedback on an OLED display and enables navigation between different modes (Menu, Camera, Sensors) using button press patterns. Users interact by pressing a button multiple times to select modes, with visual confirmation displayed on the OLED screen.
The interface uses a mode-based navigation system where button presses trigger mode changes. A single press enters Camera mode, two presses enter Sensors mode, three presses return to Menu, and holding the button activates a flashlight function. The OLED display shows the current menu state and provides clear visual feedback for each mode transition. See Ethical AI Use: Menu System with Modes for AI-assisted development details.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
The interface uses a mode-based navigation system where button presses trigger mode changes. A single press enters Camera mode, two presses enter Sensors mode, three presses return to Menu, and holding the button activates a flashlight function. The OLED display shows the current menu state and provides clear visual feedback for each mode transition. See Ethical AI Use: Menu System with Modes for AI-assisted development details.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Design files and code documentation for interface and application programming projects.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
The interface uses a mode-based navigation system where button presses trigger mode changes. A single press enters Camera mode, two presses enter Sensors mode, three presses return to Menu, and holding the button activates a flashlight function. The OLED display shows the current menu state and provides clear visual feedback for each mode transition. See Ethical AI Use: Menu System with Modes for AI-assisted development details.
A dual-interface health monitoring system that interfaces users with a MAX30102 pulse oximeter sensor through both an OLED display and a WiFi-enabled web interface. The system provides real-time visualization of heart rate (BPM), blood oxygen saturation (SpO2), and raw sensor data (IR and RED LED readings) through multiple output channels. Users can view data locally on the OLED display or remotely via a web browser accessing the ESP32-S3's built-in HTTP server. See Ethical AI Use: I2C Device Not Found for troubleshooting documentation.
The system provides dual-interface access: a local OLED display shows real-time sensor readings (IR, RED, BPM, SpO2) with visual heartbeat indicators, while a WiFi web interface provides comprehensive data visualization including numerical displays and real-time plotting charts. The web interface uses Chart.js for dynamic graph generation and automatically refreshes every 300ms to maintain real-time data updates. Both interfaces run simultaneously, enabling local monitoring and remote access.
Initial OLED display test showing successful I2C communication and display initialization. See Ethical AI Use: Hello World Code for development details.
Real-time pulse oximeter data displayed on OLED showing IR and RED LED readings, heart rate (BPM), and blood oxygen saturation (SpO2) percentage. A heartbeat indicator flashes when a pulse is detected. See Ethical AI Use: MAX30102 Initialization Fix for sensor setup documentation.
WiFi web interface providing remote access to pulse oximeter data through a responsive HTML dashboard. The interface displays real-time numerical values for BPM, SpO2, IR, and RED readings with automatic data refresh. The web server runs on the ESP32-S3, allowing access from any device on the same WiFi network.
Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library. The interface displays live line charts for BPM and SpO2 values, showing trends over time with automatic scrolling and data point management. This visualization enables users to observe patterns in heart rate and blood oxygen levels during monitoring sessions.
Successful I2C device detection after fixing power isolation issues. The system now correctly identifies the OLED display at address 0x3C and the MAX30102 sensor at address 0x57. Initial troubleshooting required isolating the RD (red LED) and IRD (infrared LED) ground terminals from the general ground plane to prevent power issues and enable proper sensor operation.
20:04:48.612 -> Scanning...
20:04:48.644 -> I2C device found at address 0x3C !
20:04:48.644 -> I2C device found at address 0x57 !
20:04:48.644 -> done
A Wi-Fi-connected grip strength meter that interfaces a user with a mechanical hand gripper, an 80 kg load cell, and an HX711 amplifier. The ESP32-S3 continuously measures grip force, streams it to a web dashboard, and uses a published relationship between handgrip strength and age to display an estimated “physiological age” in real time. The design is inspired by the open-source grip strength meter from NeuroTech Hub at WashU and the associated PLOS ONE paper on grip strength and age trajectories (Syddall et al., 2014), adapted to my load cell and handle geometry.
Mechanically, a custom 3D-printed gripper clamps around a CZL601-type 80 kg bar load cell (sourced from Amazon 80 kg load cell). I imported a 100 kg load cell CAD from GrabCAD, checked the mounting dimensions against the CZL601AC datasheet (online, download), and confirmed that the hole spacing and footprint match the commercial part used here.
The age-estimation logic in the firmware is based on the non-linear, sex-specific grip-strength trajectories reported in Dodds et al., 2014 (PLOS ONE). As shown in Figure 1 of that paper, grip strength rises rapidly through adolescence, peaks around ages 30–40, and then declines non-linearly with age, with different magnitudes for males and females.
To reproduce this shape efficiently on the ESP32, the firmware uses inverted quadratic approximations centered at age 35, consistent with the observed peak in the PLOS ONE data. In the forward direction, grip strength is approximated as:
Males: Grip(age) ≈ 52 − 0.0089·(age − 35)2
Females: Grip(age) ≈ 32 − 0.0059·(age − 35)2
On the device, this relationship is analytically inverted so that the measured grip strength can be mapped back to an estimated age:
age = 35 + √((a − Grip)/b), where a is the peak strength (52 kg for males, 32 kg for females) and b is the curvature (0.0089 for males, 0.0059 for females). The firmware clamps grip strength to physiologically meaningful ranges before applying this formula so the square root remains well-defined.
float ageFromGripMale(float g) {
float a = 52.0f, b = 0.0089f;
if (g > a) g = a;
if (g < 5) g = 5;
return 35.0f + sqrtf((a - g) / b);
}
float ageFromGripFemale(float g) {
float a = 32.0f, b = 0.0059f;
if (g > a) g = a;
if (g < 4) g = 4;
return 35.0f + sqrtf((a - g) / b);
}
For full methodological details and original tables/figures, see the open-access paper: Dodds et al., 2014, PLOS ONE (download local PDF). The implementation here is an educational approximation and not intended for clinical or diagnostic use.
Summary of how each interface application connects users with input and output devices.
| Application | How It Interfaces with the User | Input Device(s) | Output Device(s) |
|---|---|---|---|
| (a) Button User Interface | Button press patterns (single, double, triple press, hold) provide mode selection input. OLED display shows current menu state and mode options. Users receive immediate visual feedback for each interaction. | Button (GPIO pin 4) | OLED Display (SSD1306, I²C 0x3C) LED (GPIO pin 3, flashlight mode) |
| (b) Real-Time GUI (OLED & WiFi) | Physical finger placement on MAX30102 sensor provides input. OLED displays real-time sensor data locally. WiFi web interface enables remote monitoring with numerical displays and live plotting charts accessible from any web browser. | MAX30102 Pulse Oximeter Sensor (I²C 0x57) | OLED Display (SSD1306, I²C 0x3C) WiFi Web Interface (HTTP Server with Chart.js visualization) |
| (c) Grip Strength GUI (Load Cell & WiFi) | Users squeeze a mechanical hand gripper that transfers force into an 80 kg bar load cell. The ESP32-S3 measures grip strength through the HX711 amplifier and streams results to a WiFi web dashboard that displays live grip force and an estimated physiological age in real time. | Mechanical gripper linked to 80 kg load cell (CZL601-type) HX711 load cell amplifier |
WiFi Web Interface (HTTP Server with Chart.js visualization) Optional Serial Plotter (for calibration traces) |
Compare as many tool options as possible for interface and application programming.
Comprehensive comparison of interface and application programming tools available for embedded systems and IoT development. This analysis covers tools from the MIT Academy Interface & Application Programming class page, evaluating their capabilities, use cases, and trade-offs for different application scenarios.
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| OLED (SSD1306) | Monochrome OLED displays via I²C | Low power, high contrast, simple I²C interface, pixel-level control | Limited resolution (128x64), monochrome only, small display size | Status displays, sensor readouts, simple menus, embedded dashboards |
| LCD Character Displays | Character-based LCD displays (16x2, 20x4) | Simple API, readable in sunlight, low cost | Limited to text/characters, no graphics, requires backlight power | Text-only interfaces, status messages, debugging output |
| TFT Color Displays | Full-color TFT LCD displays | Color graphics, touch support, high resolution | High power consumption, complex drivers, larger footprint | Rich GUIs, image display, interactive touch interfaces |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| HTTP Server (ESP32) | Built-in HTTP server on ESP32 for web interfaces | Remote access, cross-platform (any browser), no app installation, real-time updates | Requires WiFi, network dependency, limited to local network without port forwarding | Remote monitoring, data visualization, control panels, sensor dashboards |
| WebSockets | Real-time bidirectional communication | Low latency, bidirectional, efficient for frequent updates | More complex than HTTP, requires persistent connection | Real-time streaming, interactive controls, live data feeds |
| Chart.js | JavaScript charting library for web interfaces | Beautiful charts, interactive, responsive, easy integration | Requires JavaScript, CDN dependency or local hosting | Data visualization, time series plots, sensor monitoring dashboards |
| Tool/Framework | Description | Pros | Cons | Best For |
|---|---|---|---|---|
| React Native | Cross-platform mobile app framework | Cross-platform (iOS/Android), native performance, large ecosystem | Complex setup, requires mobile development knowledge | Full-featured mobile apps, production deployments |
| Flutter | Google's UI toolkit for cross-platform apps | Single codebase, high performance, customizable UI | Dart language, larger app size, learning curve | Custom mobile interfaces, platform-specific designs |
| Progressive Web Apps (PWA) | Web apps with native-like features | No app store, cross-platform, offline capability | Limited native API access, browser dependency | Web-based mobile interfaces, simple deployment |
Detailed comparison of the specific interface programming tools implemented in this week's individual assignment, evaluating their performance, ease of use, and suitability for embedded health monitoring applications.
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | Simple I²C interface, well-documented Adafruit library, minimal wiring (SDA, SCL, power, ground) |
| Display Quality | High contrast monochrome display, crisp text rendering, suitable for sensor data visualization |
| Power Consumption | Very low power draw, ideal for battery-powered applications |
| Limitations | 128x64 pixel resolution limits detail, monochrome only, small physical size (0.96" typical) |
| Best Use Cases | Local sensor readouts, menu systems, status indicators, simple data displays |
| Aspect | Evaluation |
|---|---|
| Ease of Implementation | ESP32 WebServer library provides straightforward HTTP server, Chart.js CDN integration requires minimal setup |
| Remote Access | Accessible from any device on WiFi network (phone, tablet, computer), no app installation required |
| Visualization Capabilities | Chart.js enables rich data visualization with real-time plotting, smooth animations, and interactive features |
| Real-Time Updates | JSON API endpoint provides efficient data transfer, 300ms refresh rate maintains responsive feel |
| Limitations | Requires WiFi network, limited to local network without additional configuration, power consumption higher than OLED alone |
| Best Use Cases | Remote monitoring, data logging visualization, multi-user access, professional dashboards |
| Aspect | Evaluation |
|---|---|
| Implementation Approach | Digital GPIO reading with debouncing, press pattern detection (single/double/triple/hold) enables mode navigation |
| User Experience | Intuitive press patterns, immediate visual feedback on OLED, no complex UI navigation required |
| Reliability | Hardware debouncing with INPUT_PULLUP, timeout-based pattern recognition prevents accidental triggers |
| Limitations | Limited to single button interaction, pattern learning required, less flexible than touchscreen interfaces |
| Best Use Cases | Simple mode selection, menu navigation, embedded system controls, low-cost input solutions |
The combination of OLED display and WiFi web interface provides complementary benefits: OLED offers immediate local feedback with minimal latency and power consumption, while the WiFi interface enables rich visualization and remote access. The button-based input provides an intuitive, low-cost navigation method suitable for embedded systems. Together, these tools create a robust interface system that supports both local and remote interaction with sensor data.
Code files for ESP32-S3 development board interfaces including I2C scanning, OLED display control, and button-based user interface systems. See Week 4 documentation for board design and Week 8 documentation for pinout configurations.
i2cscan_generic.ino)Utility code for scanning and detecting I2C devices on the bus, essential for troubleshooting connection issues.
SETUP:
Initialize I2C bus
Initialize Serial communication
Print "I2C Scanner" message
LOOP:
Print "Scanning..." message
Initialize device counter to 0
FOR each address from 1 to 126:
Begin I2C transmission to address
Check transmission result
IF transmission successful (error == 0):
Print device found at address (hex format)
Increment device counter
ELSE IF unknown error (error == 4):
Print unknown error at address
IF no devices found:
Print "No I2C devices found"
ELSE:
Print "done"
Wait 5 seconds before next scan
hello_world.ino)Basic OLED display test code that initializes the display and shows "Hello World" text, confirming I2C communication and display functionality.
SETUP:
Initialize Serial communication at 115200 baud
Wait 500ms for Serial to stabilize
Initialize I2C bus with SDA pin 5, SCL pin 6
Print "Starting..." message
Attempt to initialize OLED display:
IF initialization fails:
Print "OLED not found" error
Enter infinite loop (halt)
Clear display buffer
Set text size to 2
Set text color to white
Set cursor position to (0, 20)
Print "Hello" line
Print "World!" line
Update display (send buffer to hardware)
LOOP:
Empty (runs once, then waits)
display.display() to send buffer to hardware; drawing functions only modify bufferoutputs.ino)Mode-based navigation system using button press patterns (single, double, triple, hold) to control multiple output devices including OLED display, camera, sensors, and LED flashlight.
SETUP:
Initialize OLED display
Initialize camera module
Initialize sensors (MPU6050, HX711)
Initialize button pin (INPUT_PULLUP)
Initialize LED pin (OUTPUT)
Set current mode to MENU
Display menu screen
LOOP:
Read button state
IF button pressed:
Record press start time
Start press detection timer
IF button released:
Calculate press duration
IF duration > HOLD_THRESHOLD:
Activate flashlight mode
ELSE:
Increment press count
Reset press timeout timer
IF press timeout exceeded:
Process accumulated press count:
IF press count == 1: Switch to CAMERA mode
IF press count == 2: Switch to SENSORS mode
IF press count == 3: Switch to MENU mode
Reset press count
IF current mode == MENU:
Display menu screen (button instructions)
IF current mode == CAMERA:
Capture camera frame
Process image with dithering algorithm
Display on OLED
Run Edge Impulse inference (optional)
Overlay results on display
IF current mode == SENSORS:
Read accelerometer/gyroscope data
Read load cell data
Display sensor readings on OLED
Update display
Design files and firmware for a Wi-Fi-enabled grip strength meter built around an 80 kg bar load cell, HX711 amplifier, and ESP32-S3. The mechanical design was informed by the open-source grip strength meter from NeuroTech Hub and validated against the CZL601AC bar load cell datasheet (online, download).
All parts were printed in PLA with high infill in the load paths to minimize creep and flex during repeated maximal grip trials.
loadcell_simple.ino)Minimal firmware to bring up the HX711 amplifier and read calibrated weight values over Serial for debugging and calibration.
SETUP:
Configure HX711 data and clock pins (DT=A1, SCK=A0)
Initialize Serial at 115200 baud
Begin HX711 with DT/SCK pins
Set calibration factor (grams per ADC unit)
Tare the scale so current load is zero
LOOP (every 200 ms):
If HX711 is ready:
Read averaged weight using get_units(4)
Print "weight:<value>" to Serial for Serial Plotter
Else:
Print "HX711 not ready" for troubleshooting
weight:<value> format is convenient for quickly visualizing changes while squeezing the handle.loadcell_plot.ino)Refined HX711 reader tuned for the Arduino Serial Plotter: it outputs a single numeric value per line for clean plotting of grip strength over time.
SETUP:
Initialize Serial at 115200 baud
Initialize HX711 on DT=A1, SCK=A0
Set calibration factor
Tare the scale
Optionally print debug messages when DEBUG=1
LOOP (every 200 ms):
If HX711 is ready:
Read filtered weight with get_units(4)
Optionally print labeled debug text
Print only the numeric weight to Serial for the Plotter
Else:
Optionally print "not ready" debug text
Print 0 so the plotted line continues gracefully
loadcell_simple.ino for easy swapping.DEBUG set to 0 so the output is a pure numeric stream.loadcell_gui.ino)Full application firmware that exposes grip strength and an estimated age over Wi-Fi using an HTTP server and a Chart.js web dashboard.
SETUP:
Initialize Serial
Initialize HX711 (pins, calibration factor, tare)
Connect ESP32-S3 to WiFi (MIT network in this build)
Start WebServer on port 80
Register handlers:
"/" → serve HTML+JS GUI page from PROGMEM
"/metrics" → serve JSON with current grip and age
LOOP:
Handle incoming HTTP clients
Every 200 ms:
If HX711 is ready:
Read smoothed grip strength (kg) via get_units(3)
Clamp negative values to zero
Store in global gripStrength
AGE ESTIMATION HELPERS:
ageFromGripMale(g):
Clamp g to plausible range
Compute age using inverted quadratic fit derived from normative data
ageFromGripFemale(g):
Same structure with female-specific parameters
HTTP /metrics ENDPOINT:
Read "sex" query parameter (default "male")
Compute ageEstimate = ageFromGripMale/ageFromGripFemale(gripStrength)
Return JSON:
{"grip": <kg>, "age": <years>}
CLIENT-SIDE GUI (HTML + JS):
Render dark-themed dashboard with:
- Sex toggle buttons (male/female)
- Numeric grip strength (kg) and age
- Scrolling Chart.js line plot of recent grip values
Poll /metrics every 200 ms and update DOM + chart
PROGMEM./metrics for future extensions (e.g., logging clients).ssid and password constants to match your network.Code files for the Invisible String pulse oximeter interface system, providing real-time health monitoring through OLED display and WiFi web interface. See Week 11 PCB design documentation for hardware details.
pulse_vo2_reads_fixing.ino)Local OLED display interface showing real-time pulse oximeter readings including heart rate (BPM), blood oxygen saturation (SpO2), and raw IR/RED LED sensor values.
SETUP:
Initialize Serial communication
Initialize I2C bus (SDA=5, SCL=6) at 400kHz
Initialize MAX30102 sensor
Configure sensor:
Set LED mode to RED + IR
Set ADC range to 16384
Set sample rate to 100 Hz
Set pulse width to 411 μs
Set LED brightness to medium (0x3F)
Initialize OLED display
Clear and prepare display
LOOP:
Read IR and RED LED values from sensor
Heart Rate Detection:
Check for heartbeat in IR signal using peak detection
IF heartbeat detected:
Calculate time since last beat
Calculate BPM = 60 / (time_delta / 1000)
Set beat flag for visual indicator
Update last beat timestamp
SpO2 Calculation (every 300ms):
Add IR and RED values to circular buffer
IF buffer has 50 samples:
Calculate DC components (average)
Calculate AC components (RMS)
Calculate R ratio = (AC_RED/DC_RED) / (AC_IR/DC_IR)
Estimate SpO2 = 110 - 25 * R
Clamp SpO2 to 70-100% range
Serial Output:
Print IR, RED, BPM for Serial Plotter visualization
OLED Display Update:
Clear display buffer
Display IR value (small text)
Display RED value (small text)
Display BPM value (large text, size 2)
Display SpO2 percentage (small text)
IF beat detected: Draw heartbeat indicator dot
Update display hardware
Delay 20ms (50 Hz update rate)
pulse_gui.ino)WiFi-enabled web interface providing remote access to pulse oximeter data through HTTP server with JSON API endpoint for real-time data updates.
SETUP:
Initialize Serial communication
Initialize I2C bus
Initialize MAX30102 sensor
Configure sensor (LED mode, sample rate, pulse width)
Initialize OLED display
Initialize WiFi:
Connect to network (SSID, password)
Wait for connection
Print IP address
Initialize HTTP server:
Route "/" → serve GUI HTML page
Route "/gui" → serve GUI HTML page
Route "/metrics" → serve JSON data
Start web server
LOOP:
Handle incoming HTTP client requests
Read IR and RED values from sensor
Heart Rate Calculation:
Check for heartbeat in IR signal
IF heartbeat detected:
Calculate BPM from time delta
Update global BPM variable
SpO2 Calculation:
Add IR/RED to circular buffer
IF buffer full (50 samples):
Calculate SpO2 using ratio-of-ratios
Update global SpO2 variable
Update global variables (g_ir, g_red, g_bpm, g_spo2)
OLED Display Update:
Display IR, RED, BPM, SpO2 values
Update display hardware
server.handleClient() frequently in loop() for responsive web interfacepulse_gui_2.ino)Enhanced WiFi web interface with real-time plotting capabilities using Chart.js library, displaying live line charts for BPM and SpO2 values with automatic scrolling and data management.
SETUP:
(Same as pulse_gui.ino)
Initialize WiFi, sensor, OLED, HTTP server
LOOP:
(Same as pulse_gui.ino)
Handle HTTP requests, read sensor, calculate BPM/SpO2
GUI HTML PAGE (embedded in PROGMEM):
Load Chart.js library from CDN
Create two Chart.js line chart instances:
- BPM chart (y-axis: 40-160 BPM)
- SpO2 chart (y-axis: 70-100%)
Initialize data arrays for each chart
JavaScript Update Function (runs every 300ms):
Fetch JSON data from /metrics endpoint
Update numerical displays (BPM, SpO2, IR, RED)
Add new BPM value to BPM data array
Add new SpO2 value to SpO2 data array
IF array length > maxPoints (100):
Remove oldest value (shift)
Update chart labels (array indices)
Update chart datasets with new data
Call chart.update() to refresh display
Set interval to call update function every 300ms
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's interface and application programming work.
This section documents all AI assistance used during Week 12 interface and application programming work. ChatGPT was used for code development, troubleshooting, and technical guidance. All transcripts are linked below for transparency.
AI assistance for developing the button-based menu system with mode navigation (Menu, Camera, Sensors) using press pattern detection. The conversation covered button debouncing, press pattern recognition, mode state management, and OLED menu display design.
Related to: Part (a): Simple Button User Interface on OLED
Troubleshooting session for I2C device detection issues with MAX30102 pulse oximeter sensor. The conversation addressed power isolation problems, I2C wiring verification, sensor initialization order, and ground plane isolation requirements for accurate sensor operation.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi
Development assistance for creating the initial OLED "Hello World" test program. The conversation covered I2C initialization, OLED display library setup, text rendering, and basic display configuration for XIAO ESP32-S3 development board.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (initial OLED test)
Technical guidance for fixing MAX30102 pulse oximeter sensor initialization issues. The conversation addressed sensor configuration parameters, LED brightness settings, sample rate optimization, initialization sequence requirements, and troubleshooting sensor communication problems.
Related to: Part (b): Real-Time Graphical User Interface through OLED and WiFi (pulse oximeter readings)
Code-focused assistance for designing and refining the WiFi grip strength monitor firmware. The conversation covered HX711 bring-up, load cell pin mapping, Serial Plotter debugging sketches, the ESP32-S3 HTTP server, the Chart.js dashboard, and the age-estimation helpers used in loadcell_simple.ino, loadcell_plot.ino, and loadcell_gui.ino.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi and Grip Strength Monitor design files
Calibration-focused assistance for mapping HX711 counts to kilograms and validating the grip strength readings. The discussion walked through using the Serial Plotter, collecting reference weights, tuning the calibration factor, and sanity-checking the age-estimation model derived from normative grip strength data.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi calibration workflow and the Grip Strength Monitor sketches.
Full Cursor AI transcript focused on organizing the grip strength monitor section: structuring Part (c), integrating design files, embedding images and videos, and aligning captions, external references, and the Ethical AI Use documentation for the load cell project.
Related to: Part (c): Real-Time GUI through Mechanical Gripper and WiFi, Grip Strength Monitor design files, and this Ethical AI Use section.
Complete Cursor AI transcript for Week 12 interface and application programming project documentation. This comprehensive conversation covers the creation and population of the Week 12 HTML page, including Individual Assignment sections (button UI and WiFi GUI), Group Assignment tool comparisons, Design Files documentation with pseudocode, and Ethical AI Use section organization. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive code documentation.
Related to: Complete Week 12 documentation including Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for interface and application programming work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Individual Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Wildcard Week
Key captures from the PCB engraving assignment with links to their sections.
This week focuses on exploring digital fabrication processes not covered in previous assignments. We'll design and produce something using computer-aided design and manufacturing, documenting requirements and including everything necessary for reproduction. This week also includes reflection on the impact and purpose of making (almost) anything.
Week 13 lecture covering major announcements, week 12 review, system integration reminders, and wildcard week preview.
'Step away from the panic'
Assignment: Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment.
Recitation exploring the purpose, impact, and scaling of fabrication labs and making infrastructure.
Use them, change them, source them locally, ingredients found locally, how to distribute them globally.
First few fablabs were NSF funded. Now corporate CSR, regional funding, labor funding (10 different ways). Successful fablabs are heterogeneous with lots of ways of funding. The ones that fail usually just have one sponsor.
Example: DIY Raman spectrometer for water purification (even after purifications still have sulfates and improving that too).
(Besides a lot of meetings!) What is a reasonable way to design a data collection process about what is needed and how to achieve it.
Timeline of development, cocreation, portable, skin analysis, water testing, biomaterial tech, microscopy.
Focused on rehabilitation of addicts with woodworking. (Vermont is wood producing state).
Hands-on component (no physical robot exists that can do it) and community component is also important. Inclusion is important. Solving unconscious and institutional biases.
People could be doing bad, but not because doing it with a group people with values.
Clarification: Adding infrastructure to existing fablab infrastructure to help support specific community needs (not specialized fab labs).
July 27-31, 2026 at Fab Boston 2026.
Essential resources for wildcard week digital fabrication processes and PCB design.
Comprehensive resource covering wildcard week assignment requirements and possibilities including grinding, multi-axis machining, electrical discharge machining, waterjet cutting, flatbed cutting, plasma cutting, laser metal cutting, laser micromachining, welding, molding and casting, folding, robotics, electronics, embedded programming, food, materials, biotechnology, textiles, and composites.
Course resources for embedded programming with ATtiny412 microcontroller examples:
Embedded Programming - MIT Academy
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This assignment demonstrates PCB design and fabrication using a combination of CNC milling (Carvera) for edge cuts and hole machining, and fiber laser engraving (xTool F2 Ultra) for trace creation on copper-clad boards. The project includes designing and fabricating two development boards: a simple ATtiny1626 development board and a complex RP2354A development board.
This project explores PCB fabrication using fiber laser engraving, a process not covered in previous assignments. The workflow combines subtractive manufacturing techniques: CNC milling for mechanical features (edge cuts and holes) and laser engraving for electrical traces. This approach enables rapid prototyping of custom PCBs without requiring chemical etching or specialized PCB manufacturing facilities.
ATtiny1626 is an 8-bit microcontroller with 8 pins maximum per port. Each port has 8 pins maximum (some less). Need to specify port letter and pin number:
Using mods → mill 2D PCB workflow:
Using xTool F2 Ultra fiber laser:
Using solder gun (heat gun) for component assembly.
Download design files: ATtiny_QFN.zip and RP2354A-dev-v1.1.zip
The application interfaces a user with input and/or output devices through the ATtiny1626 development board. The following table describes how the application interfaces with the user:
Design and produce something with a digital process (incorporating computer-aided design and manufacturing) not covered in another assignment. This group assignment explores various digital fabrication processes available during wildcard week.
The wildcard week assignment allows exploration of digital fabrication processes not covered in previous weeks. Possibilities include (but are not limited to):
Various welding techniques for joining materials.
Various composite fabrication techniques.
Design files for PCB engraving projects including ATtiny1626 and RP2354A development boards.
Simple development board for ATtiny1626 microcontroller with connectors, resistors, LED, and capacitor. Designed for breadboard compatibility with 100mil spacing grid.
Complex development board for RP2354A microcontroller with advanced routing and component placement.
Key insights and learnings from working with interface and application programming.
Acknowledgements and team roles for wildcard week PCB engraving work.
Transparent documentation of AI assistance used in this week's wildcard week assignment page creation.
Complete Cursor AI transcript for Week 13 wildcard week assignment page creation. This comprehensive conversation covers the creation and population of the Week 13 HTML page, including lecture and recitation notes, PCB engraving assignment documentation, design files integration, and comprehensive page structure development. The transcript demonstrates the collaborative process of building professional documentation with structured content, embedded media, and comprehensive design file documentation.
Related to: Complete Week 13 documentation including Lecture Notes, Recitation Notes, Assignment, Group Assignment, Design Files, and overall page structure
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License