Week 15: Interface and Application Programming – Group Assignment Report
Interface and Application Programming is an important part of embedded systems development. It allows a computer or application to communicate with a microcontroller board such as Arduino, ESP32, or RP2040. Through this communication, users can send commands, receive sensor data, display information, and create interactive systems.
In this group assignment, different software tools used for communication between embedded boards and computers were studied and compared. The tools analyzed were:
- Arduino IDE Serial Monitor
- Python with PySerial and Tkinter
- Processing
- Web Serial API
These tools are commonly used in digital fabrication, IoT projects, and Fab Academy assignments.
2. Objective of the Group Assignment
The objectives of this assignment were:
- To understand how interface and application programming tools communicate with embedded boards.
- To compare different tools based on usability, features, flexibility, and complexity.
- To identify which tools are suitable for beginners and advanced users.
- To learn different workflows for serial communication and visualization.
- To explore methods for building graphical user interfaces (GUIs) and web-based interfaces.
3. Comparison of Interface and Application Programming Tools
| Tool | Main Purpose | Programming Language | GUI support | Difficulty Level | Best Use Case |
|---|---|---|---|---|---|
| Arduino Serial Monitor | Simple serial communication | Arduino/C++ | No | Beginner | Debugging and testing |
| Python + PySerial + Tkinter | Desktop applications and data visualization | Python | Yes | Intermediate | Custom applications |
| Processing | Visual graphics and animations | Processing/Java | Yes | Intermediate | Interactive visualization |
| Web Serial API | Browser-based serial communication | JavaScript | Yes | Advanced | Web dashboards and IoT |
4. Typical Workflow of Each Tool
A. Arduino Serial Monitor
Workflow
- Connect embedded board to computer.
- Upload Arduino sketch.
- Open Serial Monitor from Arduino IDE.
- Set baud rate.
- Send and receive serial data.
Example Code
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello from Arduino");
delay(1000);
}
Advantages
- Very easy to use.
- Built into Arduino IDE.
- Good for debugging.
- No extra software needed.
Disadvantages
- No graphical interface.
- Limited visualization features.
- Cannot create advanced applications.
Best For: Beginners / Quick testing and debugging
Useful Links: Arduino IDE Download | Arduino Serial Documentation
B. Python with PySerial and Tkinter
Python can communicate with embedded boards using the PySerial library. Tkinter can then be used to create desktop graphical interfaces.
Workflow
- Install Python.
- Install PySerial library.
- Connect embedded board.
- Read serial data using Python.
- Display data using Tkinter GUI.
Example Code
import serial
arduino = serial.Serial('COM4', 9600)
while True:
data = arduino.readline().decode().strip()
print(data)
Advantages
- Powerful and flexible.
- Can create professional desktop applications.
- Good for data logging and automation.
- Cross-platform support.
Disadvantages
- Requires Python installation.
- More programming knowledge needed.
- GUI design can become complex.
Best For: Intermediate users / Advanced embedded applications / Data visualization projects
Useful Links: Python Official Website | PySerial Documentation | Tkinter Documentation
Information about PySerial being cross-platform and supporting serial communication was referenced from official documentation.
C. Processing
Processing is a programming environment mainly used for graphics, animation, and interactive applications. It can communicate with Arduino through serial communication.
Workflow
- Install Processing IDE.
- Connect Arduino board.
- Import Serial library.
- Read serial data.
- Visualize data with graphics.
Example Code
import processing.serial.*;
Serial myPort;
void setup() {
myPort = new Serial(this, "COM4", 9600);
}
void draw() {
if (myPort.available() > 0) {
String data = myPort.readStringUntil('\n');
println(data);
}
}
Advantages
- Excellent for graphics and visualization.
- Easy to create interactive applications.
- Good for artistic and educational projects.
Disadvantages
- Less suitable for large applications.
- Requires understanding of graphics programming.
- Limited compared to full desktop frameworks.
Best For: Interactive media projects / Real-time sensor visualization / Educational demonstrations
Useful Links: Processing Official Website | Processing Serial Library Reference
Helpful tutorial videos: Serial Communication from Processing to Arduino | Arduino processing communication
D. Web Serial API
The Web Serial API allows web browsers to communicate directly with embedded boards using JavaScript.
Workflow
- Connect embedded board.
- Open web application in supported browser.
- Request serial port access.
- Read and write serial data using JavaScript.
- Display data on webpage dashboard.
Example Code
const port = await navigator.serial.requestPort();
await port.open({ baudRate: 9600 });
Advantages
- Runs directly in web browser.
- No desktop software installation needed.
- Good for IoT dashboards.
- Modern web technology integration.
Disadvantages
- Limited browser support.
- Experimental technology.
- More complex setup.
- Requires JavaScript knowledge.
Best For: Advanced users / Web dashboards / Browser-based interfaces
Useful Links: MDN Web Serial API Documentation | JavaScript Official Documentation
According to MDN documentation, the Web Serial API allows websites to communicate directly with serial devices such as microcontrollers and development boards.
5. Advantages and Disadvantages Summary
| Tool | Advantages | Disadvantages |
|---|---|---|
| Arduino Serial Monitor | Easy, fast, beginner friendly | No GUI, limited features |
| Python + PySerial + Tkinter | Powerful, customizable, GUI support | Requires more coding knowledge |
| Processing | Strong visualization and graphics | Less suitable for complex software |
| Web Serial API | Browser-based and modern | Experimental and browser limitations |
6. Best Tools for Beginners and Advanced Users
| User Level | Recommended Tool | Reason |
|---|---|---|
| Beginner | Arduino Serial Monitor | Simple setup and easy debugging |
| Beginner-Intermediate | Processing | Easy visualization and interaction |
| Intermediate | Python + PySerial + Tkinter | Powerful desktop applications |
| Advanced | Web Serial API | Modern browser communication and IoT integration |
7. Reflection on What Was Learned
Through this assignment, we learned that interface programming is essential in embedded systems because it helps users interact with hardware in a meaningful way.
We discovered that:
- Arduino Serial Monitor is the simplest tool for debugging and testing.
- Python provides powerful control and can create professional applications.
- Processing is useful for real-time graphics and interactive visualization.
- Web Serial API introduces modern browser-based communication between hardware and web applications.
We also learned the importance of:
- Serial communication protocols
- Baud rate configuration
- Data transmission between devices
- Creating user interfaces for embedded systems
This comparison helped us understand how different tools are selected depending on project requirements, user experience, and application complexity.
8. Conclusion
Different interface and application programming tools provide different advantages depending on the project goals.
Arduino Serial Monitor is best for simple debugging and learning serial communication. Python with PySerial and Tkinter is suitable for advanced desktop applications and automation. Processing is ideal for graphical visualization and interactive projects. Web Serial API offers modern browser-based communication for web applications and IoT systems.
Choosing the correct tool depends on:
- User experience level
- Application complexity
- Need for graphical interfaces
- Platform requirements
This assignment improved our understanding of communication between embedded systems and software applications, which is an important skill in Fab Academy and digital fabrication projects.
Suggested Images for Documentation
You can strengthen your documentation by adding:
- Screenshot of Arduino Serial Monitor
- Python Tkinter GUI screenshot
- Processing visualization screenshot
- Web Serial browser dashboard screenshot
- Diagram of serial communication workflow
Useful image sources: Arduino Documentation Images | Processing Examples Gallery | MDN Web Serial Examples
Community discussions also highlighted practical issues such as baud rate matching, serial port access conflicts, and debugging methods during serial communication projects.
Communication Protocols
MQTT
Lightweight IoT messaging protocol used for real-time communication via broker systems.
Official MQTT WebsiteREST API
HTTP-based communication method used to connect devices with web services.
Learn REST APIIoT Platforms
ThingSpeak
Cloud platform for storing and visualizing sensor data.
ThingSpeakNode-RED
Flow-based IoT dashboard and automation tool.
Node-REDMobile & Desktop Interfaces
MIT App Inventor
Block-based Android app builder for IoT control.
Blynk
Mobile dashboard for IoT remote monitoring.
Python Tkinter
Desktop GUI library for Python applications.
Embedded Interfaces
Arduino Serial Monitor
Used for debugging and reading sensor data.
LCD / TFT Display
Used for displaying sensor values directly on hardware.
📊 Deep Comparison of Interface & Application Tools
| Tool | Type | Workflow | Communication | Data Type | UI Level | Best Use Case |
|---|---|---|---|---|---|---|
| MQTT | Protocol | Publish/Subscribe via broker | WiFi / Internet | JSON / Text | Low (backend) | Real-time IoT systems |
| REST API | Web Protocol | Request/Response (HTTP) | Internet | JSON | Medium | Web & mobile integration |
| Node-RED | IoT Platform | Flow-based programming | MQTT / HTTP | JSON | High (Dashboard) | Automation + dashboards |
| ThingSpeak | Cloud | Data upload + visualization | HTTP | Numeric data | High (Graphs) | Data logging |
| Blynk | Mobile App | Drag dashboard widgets | WiFi | Sensor values | High | Remote control |
| Arduino Serial Monitor | Debug Tool | Serial communication | USB | Text | Low | Testing sensors |
Summary Conclusion
Interface and application programming tools enable communication between hardware, software, and cloud systems. The best tool depends on whether the system is local, mobile, or cloud-based.