Week 15 - Interface and Application Programming
Overview
This week focused on interface and application programming, specifically developing a graphical user interface (GUI) that communicates with an embedded microcontroller board that I designed and fabricated.
My individual assignment explores the application layer of my final project, a handheld console and wearable system designed to guide users through entrepreneurial thinking, reflective journaling, and design iteration.
I developed a desktop journaling application using Python and Tkinter. The application allows users to navigate prompts, enter written responses, save entries locally, and review previous responses. The embedded hardware consists of my FabriXiao PCB, a tactile push button, and an LED.
The system is designed to communicate through USB serial, allowing a physical button press to advance the application to the next prompt while the LED provides immediate hardware feedback.
Group Assignment
- Compare different interface and application programming tools.
- Explore their typical applications, development workflows, and communication capabilities.
- Document the group work and reflect on the tools explored.
Individual Assignment
- Develop an application that interfaces with an embedded board that I designed and fabricated.
- Implement a graphical user interface for interacting with the system.
- Establish communication between the application and the embedded hardware.
- Document the development process, source code, testing, and troubleshooting.
Research
What is Interface and Application Programming?
Interface and application programming bridges the gap between embedded hardware and the humans who use it. Embedded programming focuses on what the microcontroller does internally and interface programming focuses on how a person interacts with that system. Most interface programing is accomplished through screens, buttons, keyboards, sliders, or any other input/output mechanisms. For this week I explored several approaches to building a user interface that communicates with a microcontroller:
Tool Comparison — Group Assignment
As a remote student at the Charlotte Super Fab Lab node, I explored application development tools that could support communication between embedded hardware and user interfaces.
Charlotte Super Fab Lab — Group Assignment Documentation
The group research explored desktop, mobile, browser-based, and IoT application development options. I also considered how these approaches could support the interaction and data storage requirements of my final project.
| Tool | Development Workflow | Communication | Typical Application | Limitation |
|---|---|---|---|---|
| Python and Tkinter | Python scripting and GUI widgets | USB serial through pyserial | Desktop applications and local data storage | Requires a Python environment |
| MIT App Inventor | Visual block-based programming | Bluetooth Low Energy | Mobile device interfaces | Limited advanced customization |
| Adafruit Bluefruit Connect | Prebuilt mobile interface | BLE UART | Rapid wireless hardware testing | Limited interface customization |
| JavaScript | HTML, CSS, and JavaScript development | Web Serial or Web Bluetooth | Custom browser-based interfaces | Browser compatibility restrictions |
| Arduino Web Server | Embedded firmware serving web content | Wi-Fi and HTTP | Local hardware control interfaces | Requires Wi-Fi-capable hardware |
| WebSockets | Client-server application programming | Persistent network connection | Real-time monitoring and control | Increased programming complexity |
| Adafruit IO | Configure data feeds and dashboards | MQTT or HTTP API | IoT monitoring and visualization | Cloud service limitations |
| Blynk | Configure dashboard widgets and device firmware | Wi-Fi and cloud services | Mobile and web-based IoT control | Platform dependency |
| Losant | Visual workflows and configurable dashboards | MQTT and webhooks | Industrial monitoring and automation | More infrastructure than this prototype requires |
Group Assignment Reflection
Comparing these tools helped me understand that interface development involves more than selecting a programming language. The communication protocol, hardware capabilities, user experience, data storage requirements, and intended operating environment all influence the selection of an application development platform.
For this prototype, Python with Tkinter provided a straightforward approach to developing a desktop interface without requiring wireless connectivity or cloud-based infrastructure. Python also allowed me to combine graphical interface development, serial communication, and local data storage within a single programming environment.
Although wireless and mobile interfaces present opportunities for future development, USB serial communication allowed me to focus on the interaction logic and application functionality before introducing additional system complexity.
Connection to My Final Project
My final project is a dual-device system consisting of a handheld console and a wearable. The system is designed to support entrepreneurial thinking, innovation, and reflective design iteration through guided journaling.
The desktop application developed this week serves as a functional prototype of the interaction logic intended for the handheld console. Developing the application independently of the final enclosure and integrated electronics allows me to evaluate the journaling workflow before transferring these functions to the embedded system.
Prototype System Architecture
| Function | Week 15 Prototype | Final Project Application |
|---|---|---|
| User Interface | Desktop Tkinter application | Integrated console display |
| Text Input | Computer keyboard | Integrated keyboard |
| Prompt Navigation | Application controls and external push button | Integrated physical controls |
| Hardware Feedback | LED indicator | Integrated visual or haptic feedback |
| Data Storage | Local JSON file | Embedded data storage |
| Communication | USB serial | Communication between integrated system components |
The underlying interaction principles remain consistent between the desktop prototype and the final project: presenting prompts, accepting user responses, managing navigation, providing feedback, and retaining user-generated information. The primary difference is how these functions are implemented within the final embedded hardware.
This assignment provides an opportunity to evaluate these functions individually before integrating them into the handheld console.
Objective
The objective of this prototype is to establish communication between my FabriXiao PCB and a desktop journaling application using USB serial communication. A physical push button provides an external input for prompt navigation, while an LED provides immediate feedback when a button press is detected.
Hardware
For this assignment, I used the FabriXiao, a custom PCB platform that I have been developing and iterating throughout Fab Academy and Fabricademy. This iteration uses the Seeed Studio XIAO RP2040 as the microcontroller module.
| Component | Quantity | Purpose |
|---|---|---|
| Seeed Studio XIAO RP2040 | 1 | Microcontroller and USB serial communication |
| FabriXiao PCB | 1 | Custom circuit board for component integration |
| Tactile Push Button | 1 | Physical input for advancing prompts |
| LED | 1 | Visual acknowledgment of a button press |
| 100 ohm Resistor | 1 | LED current limiting in the original design |
| Copper Tape | As needed | Conductive PCB traces |
| Acrylic Sheet | As needed | PCB substrate |
| USB-C Data Cable | 1 | Power and serial communication with the computer |
Why These Components
The hardware configuration was intentionally kept simple so that I could focus on communication between the embedded system and the application rather than introducing additional hardware complexity.
The tactile push button represents the physical navigation controls intended for my final handheld console. The LED provides immediate visual feedback when the firmware detects a button press. This feedback confirms that the hardware registered the input, rather than confirming that the application successfully saved an entry.
A current-limiting resistor is placed in series with the LED to control the current drawn from the microcontroller's GPIO pin.
The XIAO RP2040 supports native USB communication, making it possible to power the board and exchange serial messages with the desktop application through a single USB-C data cable.
Testing the Fabrixiao
Before building the PCB, I tested my existing Fabrixiao to determine whether it was still functional since i've been iterating with this same board since FAB 25 and Fabricademy. 1. Connected the Fabrixiao to my computer via USB-C 2. Opened Device Manager on Windows (right-click Start → Device Manager) 3. Looked under Ports (COM & LPT) for a new COM port
Software Steps
PCB Design — KiCad Schematic
The PCB design for this assignment incorporates one physical input and one visual output connected to the XIAO RP2040. The schematic was developed in KiCad 10.0 and builds upon my previous FabriXiao electronics design and fabrication work.
GPIO Pin Assignment
| XIAO Pin | RP2040 GPIO | Component | Configuration |
|---|---|---|---|
| D0 | GPIO26 | Tactile push button | Digital input with internal pull-up |
| D1 | GPIO27 | LED | Digital output |
| GND | Ground | Button and LED | Common ground |
| USB-C | Native USB | Computer connection | Power and serial communication |
Schematic Walkthrough
U1 — XIAO RP2040
The XIAO RP2040 processes the physical button input, controls the LED output, and transmits serial messages to the desktop application.
SW1 — Tactile Push Button
The push button connects D0 to ground when pressed. The firmware enables the microcontroller's internal pull-up resistor, maintaining a HIGH logic state when the button is released. Pressing the button pulls the input LOW, creating an active-low input signal.
R1 — LED Current-Limiting Resistor
The original schematic specifies a 100 ohm resistor in series with the LED. Using a nominal GPIO output voltage of 3.3 V and an assumed LED forward voltage of 2.0 V, the estimated current is calculated using Ohm's law:
I = (Vout - Vf) / R
I = (3.3 V - 2.0 V) / 100 ohms
I = 0.013 A = 13 mA
This estimated current exceeds the RP2040's highest nominal GPIO drive-strength setting of 12 mA. The drive-strength setting is not a protective current limit.
A more conservative resistor selection for this indicator LED would be 330 ohms:
I = (3.3 V - 2.0 V) / 330 ohms
I = approximately 3.9 mA
Actual LED current depends on its forward voltage and the GPIO output characteristics. The resistor should be selected accordingly before operating the circuit.
LED1 — Visual Feedback
The LED anode connects to D1 through the current-limiting resistor, while its cathode connects to ground. When the firmware sets D1 HIGH, the LED illuminates to acknowledge the detected button press.
USB-C — Power and Data Interface
The onboard USB-C connector provides power and native USB communication between the microcontroller and the desktop application. This eliminates the need for an external USB-to-UART adapter.
Schematic Process
Schematic Process
The schematic design follows the electronics design workflow established during Week 06.
- Identify the microcontroller and required input and output components.
- Assign GPIO pins for the tactile push button and LED.
- Connect the push button between D0 and ground.
- Connect the LED and its series resistor between D1 and ground.
- Establish a common ground for the circuit.
- Review the component connections and GPIO assignments against the microcontroller pinout.
- Use KiCad's Electrical Rules Checker (ERC) to identify potential schematic connection errors.
Because USB communication is handled internally by the XIAO RP2040, additional external serial communication circuitry is not required for this prototype.
Hardware Steps
Physical PCB Fabrication
This assignment builds upon my previous FabriXiao development, which incorporates an acrylic substrate and conductive copper tape traces.
The electronics design and fabrication methods are documented in my previous assignments:
Before connecting the PCB to the application, the hardware verification process includes checking electrical continuity, identifying unintended shorts, confirming component polarity, and verifying that the microcontroller is recognized by the computer through USB.
The focus of this week's assignment is the application interface and communication with the embedded hardware rather than repeating the complete PCB fabrication process.
Firmware
Platform Choice: CircuitPython
I selected CircuitPython for the FabriXiao firmware because it provides a straightforward development environment for rapid embedded hardware prototyping.
- Rapid development: CircuitPython executes Python instructions stored in a code.py file on the microcontroller's CIRCUITPY drive without requiring a separate manual compilation process.
- Native USB communication: The built-in usb_cdc module allows the RP2040 to exchange serial data with the computer through its USB-C connection.
- Hardware integration: Built-in modules provide access to GPIO pins, digital inputs, digital outputs, and timing functions.
- Scalability: Additional CircuitPython libraries support future integration of displays, sensors, and external storage devices.
USB CDC Configuration
USB CDC stands for Universal Serial Bus Communications Device Class. It allows the microcontroller to communicate with the computer through a virtual serial port.
CircuitPython provides two USB CDC interfaces:
| Interface | Purpose |
|---|---|
| usb_cdc.console | Interactive programming console, debugging, and REPL access |
| usb_cdc.data | Dedicated serial communication with the desktop application |
The dedicated data interface separates application messages from debugging output. Because the secondary data interface is disabled by default, it must be enabled through the boot.py configuration file.
boot.py Configuration
import usb_cdc
usb_cdc.enable(console=True, data=True)
The boot.py file is stored in the root directory of the CIRCUITPY drive. It runs during startup before the USB interfaces are initialized. After modifying this configuration, the microcontroller must be reset or power-cycled.
Although CircuitPython includes the usb_cdc module, the desktop Python application requires the additional pyserial package to access the computer's serial ports.
Reference: CircuitPython USB CDC Documentation.
Firmware Code
The firmware monitors the physical push button, controls the LED indicator, and transmits navigation commands to the desktop journaling application.
Required Modules
| Module | Function |
|---|---|
| board | Provides access to the microcontroller's pin definitions |
| digitalio | Configures and controls digital inputs and outputs |
| time | Provides timing and delay functions |
| usb_cdc | Provides USB serial communication |
Firmware Execution Sequence
- Initialize D0 as a digital input with an internal pull-up resistor.
- Initialize D1 as a digital output for the LED.
- Continuously monitor the button's logic state.
- Detect a transition from HIGH to LOW when the button is pressed.
- Illuminate the LED briefly to acknowledge the detected input.
- Transmit the navigation command through the USB CDC data interface.
- Continue monitoring the button for subsequent input events.
Original Firmware Source Code
Key Implementation Notes
Active-Low Button Input
The internal pull-up resistor maintains a HIGH logic state when the button is released. Pressing the button connects the input to ground, producing a LOW logic state.
| Button State | GPIO State | Boolean Value |
|---|---|---|
| Released | HIGH | True |
| Pressed | LOW | False |
Falling-Edge Detection
The firmware detects a button press by comparing the current input state with its previous state. A transition from HIGH to LOW represents a new press event.
This prevents the firmware from continuously generating commands while the button remains pressed. However, falling-edge detection alone does not eliminate mechanical switch bounce. A timed debounce interval or stable-state verification would provide more reliable input detection.
LED Feedback
The LED illuminates for approximately 0.1 seconds when a button press is detected. This provides immediate visual acknowledgment that the microcontroller registered the physical input.
This indicator does not confirm that the desktop application received the command or successfully saved a journal entry, because the current communication protocol does not include an acknowledgment message from the application.
Serial Message Transmission
The firmware uses the dedicated USB CDC data interface to transmit a simple navigation command:
NEXT\n
NEXT identifies the requested navigation action, while the newline character identifies the end of the message. This allows the desktop application to read and interpret complete commands using line-based serial processing.
The current prototype uses unidirectional communication from the microcontroller to the computer. This reduces protocol complexity while establishing the interaction between the physical input and graphical user interface.
Building the Application
Platform Choice: Python with Tkinter
I chose Python with the Tkinter GUI lirary for the destop application because:
| Software or Module | Purpose |
|---|---|
| Python 3 | Primary application programming language |
| Tkinter | Graphical user interface development |
| pyserial | Communication with the FabriXiao through USB serial |
| json | Structured local data storage |
| datetime | Timestamp generation for journal entries |
Software Installation and Setup
Python 3 provides the programming environment for the desktop application. Tkinter is included with standard Windows installations of Python when Tcl/Tk support is enabled.
The Python installation can be verified through the command line:
python --version
The graphical interface environment can be verified using:
python -m tkinter
Unlike Tkinter and the standard Python modules used for data storage, pyserial must be installed separately:
python -m pip install pyserial
Once the development environment is configured, the application can be executed from the directory containing the Python source file:
python journal_app.py
This development environment allows the application to operate locally on the computer without requiring an internet connection or cloud-based service.
Application Architecture
I organized the application into four functional layers to separate the user interface, application logic, data storage, and hardware communication.
| Layer | Responsibility | Implementation |
|---|---|---|
| Prompt Layer | Manage journal prompts and navigation | Python data structures and prompt indexing |
| Storage Layer | Save and retrieve journal entries | JSON files and timestamps |
| User Interface Layer | Display prompts and accept user responses | Tkinter graphical widgets |
| Serial Communication Layer | Receive navigation commands from the PCB | pyserial and background threading |
Graphical User Interface Design
The interface was designed around a guided journaling workflow. Presenting one prompt at a time allows the user to focus on an individual question without displaying the entire journaling session at once.
| Interface Element | Function | Design Rationale |
|---|---|---|
| Prompt Display | Displays the current question | Maintains focus on the current task |
| Text Entry Area | Accepts written responses | Supports extended reflective writing |
| Navigation Controls | Move between journal prompts | Allow independent application operation |
| Save Function | Stores journal responses | Preserves user-generated information |
| View Entries | Displays previously recorded responses | Supports reflection and design iteration |
| Connection Status Indicator | Indicates hardware connection status | Communicates system availability |
| Timestamp Display | Identifies when an entry was recorded | Provides chronological context |
Application Interaction Workflow
- Launch the desktop journaling application.
- Read the current design-thinking prompt.
- Enter a written response using the computer keyboard.
- Save the response to local storage.
- Advance to the next prompt using the application controls or the intended hardware input.
- Repeat the process throughout the journaling session.
- Review previously recorded entries.
The application is designed to remain functional when the FabriXiao is disconnected. This allows the graphical interface and data storage functions to be evaluated independently of the embedded hardware.
The Prompts
The application contains seven prompts that guide users through an entrepreneurial design iteration session. Each prompt encourages the user to examine a different aspect of problem identification, innovation, or product development.
| Prompt | Purpose |
|---|---|
| The Problem You're Obsessed With | Identify and define a meaningful problem |
| Your Unfair Advantage | Identify unique skills, resources, and experiences |
| Assumptions You're Making | Examine assumptions that influence design decisions |
| The Person You're Designing For | Consider the intended user's needs and experiences |
| What Failure Would Teach You | Reframe unsuccessful outcomes as learning opportunities |
| The Simplest Possible Version | Identify a minimum viable solution |
| Iteration Reflection | Evaluate progress and identify opportunities for improvement |
Data Storage and Entry Management
The application uses JSON (JavaScript Object Notation) to store journal entries locally. JSON provides a lightweight, human-readable format for organizing structured information without requiring a separate database.
Each journal entry associates the user's written response with its corresponding prompt and timestamp. This allows the application to retain contextual and chronological information when previous entries are reviewed.
The storage workflow consists of collecting the user's response, associating it with the current prompt, generating a timestamp, and writing the entry to local storage.
Local storage also supports the privacy objectives of my final project by allowing the application to retain information without requiring transmission to an external server.
Timestamp Management
Timestamps allow users to identify when individual journal entries were recorded. This supports the reflective nature of the application by providing a chronological record of the user's design-thinking process.
The timestamp visible in the application also provides feedback that an entry has been recorded.
Application Code
The desktop application was developed in Python using Tkinter for graphical interface development and pyserial for communication with the FabriXiao PCB.
The application source code includes the prompt definitions, graphical interface elements, navigation functions, local data storage, timestamp handling, and serial communication logic.
Background Serial Communication
The serial listener is designed to operate in a background thread so that monitoring incoming hardware messages does not block the graphical interface.
Tkinter's main event loop manages graphical interface updates and user interactions. Separating serial monitoring from the main interface allows the application to remain responsive while waiting for hardware input.
Original Python Source File
- Save journal_app.py to a folder on the computer.
- Open Command Prompt or PowerShell in that directory.
- Execute the application using the following command:
python journal_app.py
The application is designed to attempt a connection with the FabriXiao PCB during startup. When the hardware is unavailable, the application continues to operate independently while periodically attempting to establish a serial connection.
Standalone Application Testing
Before testing communication with the physical PCB, I evaluated the desktop application independently. This allowed me to verify the graphical interface, text entry, prompt navigation, timestamp display, and entry review functions without introducing hardware-related variables.
During testing of the prototype without the board hooked up I was able to prove that the code is functional and the app behaves
as it is inteded to.
I was able to answer prompt 1.
Navigating to the second prompt also noting that the first entry was time stamped at the bottom of the screen.
Viewing all entries.
System Communication
How the Board and Application Communicate
The FabriXiao PCB and desktop journaling application communicate through the XIAO RP2040's native USB interface. CircuitPython provides the embedded USB CDC interface, while pyserial allows the desktop Python application to access the corresponding virtual serial port.
| Communication Parameter | Configuration |
|---|---|
| Physical Connection | USB-C data cable |
| Communication Interface | USB CDC virtual serial port |
| Serial Configuration | 115200 baud |
| Message Format | Text-based command |
| Message Delimiter | Newline character (\n) |
| Communication Direction | Microcontroller to desktop application |
Although the desktop application specifies a baud rate of 115200, native USB CDC communication does not depend on a physical UART transmitting at that rate.
Communication Protocol
The communication protocol uses a single navigation command:
NEXT\n
The NEXT command represents a request to advance the application to the next journal prompt. The newline character identifies the end of the message, allowing the receiving application to process individual commands.
System Data Flow
- The user presses the tactile push button on the FabriXiao PCB.
- The microcontroller detects the falling edge of the digital input.
- The firmware briefly activates the LED as visual feedback.
- The microcontroller transmits the NEXT command through USB CDC.
- The desktop application's serial listener receives and interprets the message.
- The application invokes its prompt navigation function.
- The graphical interface displays the next journal prompt.
The current communication protocol is intentionally unidirectional. Future iterations could introduce bidirectional communication, allowing the application to transmit prompt information, connection acknowledgments, or other system states back to the embedded hardware.
Serial Port Detection
The desktop application uses pyserial to scan the serial ports available on the computer. The original detection method searches port descriptions for identifiers such as CircuitPython or USB Serial.
This approach reduces the need to manually configure a COM port each time the microcontroller is connected.
Identifying the Correct Serial Port
CircuitPython can expose separate console and data serial interfaces. Consequently, identifying a port by its description alone does not guarantee that the application has selected the correct data interface.
On Windows, the available serial ports can be inspected through Device Manager under Ports (COM and LPT). Comparing the available ports before and after connecting the microcontroller helps identify the newly detected interfaces.
The available serial ports can also be listed using pyserial:
python -m serial.tools.list_ports -v
Connection Management
The application is designed to attempt a serial connection during initialization. If the FabriXiao is unavailable, the application continues operating independently and retries the connection approximately every three seconds.
The graphical connection indicator provides feedback about the application's serial connection state. However, opening a serial port does not independently confirm that valid commands are being received from the embedded board.
Successful communication is verified by transmitting a recognizable command from the microcontroller and observing the corresponding response within the application.
System Testing
I separated application testing from hardware integration testing to isolate potential problems within each part of the system.
Standalone testing evaluated the graphical interface and application logic, while integrated testing focuses on the communication pathway between the physical PCB and the desktop application.
Standalone Application Testing Results
| Test | Expected Behavior | Result |
|---|---|---|
| Application Initialization | Application launches and displays the first prompt | Successful |
| Text Entry | Interface accepts written responses | Successful |
| Prompt Navigation | Application advances to the next prompt | Successful |
| Timestamp Display | Recorded response displays a timestamp | Successful |
| Entry Review | Previously recorded responses can be viewed | Successful |
| Operation Without Hardware | Application remains functional without the PCB connected | Successful |
Integrated Hardware and Application Testing
The integrated testing procedure evaluates whether a physical input on the FabriXiao PCB produces the corresponding navigation event within the desktop application.
- Connect the FabriXiao PCB to the computer using a USB-C data cable.
- Verify that the microcontroller and USB CDC data interface are recognized.
- Launch the desktop journaling application.
- Confirm that the application opens the intended serial port.
- Press the physical push button on the PCB.
- Observe the LED feedback on the board.
- Verify that the application advances to the next prompt.
- Repeat the button press to evaluate consistent navigation behavior.
Final System Demonstration
Problems Encountered
Separating Application Testing from Hardware Testing
One of the development challenges was determining how to evaluate the application independently of the physical PCB. Testing both systems simultaneously would make it more difficult to determine whether a problem originated in the embedded firmware, serial communication, or desktop application.
Approach
I developed and tested the desktop application independently before evaluating its communication with the FabriXiao. This allowed me to isolate the graphical interface, prompt navigation, text entry, and storage functions.
Result
The standalone application successfully displayed prompts, accepted written responses, recorded timestamps, and displayed previous journal entries without requiring a connected microcontroller.
Maintaining Application Responsiveness
Serial communication introduces the possibility of blocking the graphical interface while the application waits for incoming data.
Design Solution
The application architecture separates serial monitoring from the graphical interface through background threading. This allows the interface to remain available for user interaction while the application monitors incoming serial messages.
Serial Port Identification
Automatic serial port detection introduces a potential challenge because CircuitPython can expose separate console and data interfaces.
Verification Approach
Windows Device Manager and pyserial's port listing utilities can be used to identify the available interfaces. Successful communication must be verified through the receipt of valid messages rather than relying exclusively on the connection status indicator.
Button Detection and Feedback
The firmware uses falling-edge detection to prevent continuous command transmission while the button remains pressed. Mechanical switch bounce remains a consideration for future firmware refinement.
A timed debounce interval or stable-state verification could improve the reliability of physical input detection.
The LED provides immediate confirmation that the microcontroller detected a button press. Confirmation that the application received the command would require additional communication between the application and the board.
Results
The desktop journaling application demonstrates the application-level functionality intended for my final handheld console. Standalone testing verified the graphical interface, prompt navigation, text entry, timestamp display, and review of recorded journal entries.
The embedded hardware and communication protocol were developed to extend this functionality to a physical input device using the FabriXiao PCB.
Functional Results Summary
| System Function | Result |
|---|---|
| Graphical User Interface | Successfully demonstrated |
| Journal Prompt Navigation | Successfully demonstrated |
| Text Entry | Successfully demonstrated |
| Timestamp Display | Successfully demonstrated |
| Review of Recorded Entries | Successfully demonstrated |
| Standalone Application Operation | Successfully demonstrated |
| USB Serial Communication | Integrated demonstration pending documentation |
| Physical Button Navigation | Integrated demonstration pending documentation |
| LED Hardware Feedback | Integrated demonstration pending documentation |
Final System Demonstration
Reflection
What I Learned This Week
This assignment helped me understand the relationship between embedded programming, communication protocols, and user interface development. The microcontroller and application perform separate functions, but their interaction allows physical inputs to influence a graphical interface.
Developing the desktop application independently of the final embedded system demonstrated the value of modular development. I was able to evaluate the journaling workflow and application logic before integrating additional hardware complexity.
I also learned that establishing a serial connection is only one part of successful communication. Both systems must interpret the same message format and respond appropriately to the information being exchanged.
What I Would Do Differently
In a future iteration, I would implement a more structured communication protocol that supports bidirectional messages and acknowledgments. This would allow the hardware to distinguish between a detected button press, successful message delivery, and successful recording of a journal entry.
I would also improve physical input reliability through dedicated debouncing and refine the application's serial port identification process.
Additional development could include more robust data storage, improved error handling, and expanded integration with the display and keyboard of my final handheld console.
Application to My Final Project
This assignment establishes the foundation for the interaction model of my final project. The prompt structure, navigation logic, response handling, and storage principles developed in the desktop application can inform the implementation of the embedded console.
Although the final hardware implementation will differ from the desktop prototype, the underlying user experience and functional requirements remain consistent.
Technical References
- CircuitPython Documentation
- CircuitPython USB CDC Documentation
- Seeed Studio XIAO RP2040 Documentation
- Python Tkinter Documentation
- pySerial Documentation
- Python JSON Documentation
- Python Threading Documentation
- Fab Academy Assessment Criteria
Original Design and Programming Files
The following files support the reproduction and further development of the embedded hardware and desktop journaling application.
| File | Description | Download |
|---|---|---|
| boot.py | CircuitPython USB CDC configuration | Pending upload |
| code.py | FabriXiao firmware for button detection, LED feedback, and serial communication | Pending upload |
| journal_app.py | Python desktop journaling application | Pending upload |
| KiCad Schematic | Embedded board schematic and component connections | Pending upload |