In this project, we will prototype a frontline rural clinic triage product: TriaSense.
- Get familiar with buttons
- Implement a classification system using decision tree
- Create an interactive and engaging user experience
- ESP32 development board
- 4 push buttons
- OLED display (Adafruit SSD1306, 128x64)
- USB cable
- Breadboard and jumper wires
- Arduino IDE or PlatformIO
- ESP32 board support package
- Required libraries:
- EloquentTinyML
- Adafruit SSD1306
- Dependencies defined in
requirements.txt
.
├── src/ # Source code directory for laptop
│ └── TriaSense_laptop.py # Python script for training the model
├── requirements.txt # Python dependencies
├── TriaSense_ESP32/
└── TriaSense.ino # ESP32 Arduino sketch
├── assets/ # Assets directory
│ └── TriaSense.png # Wiring diagram
└── README.md # Lab manual
The dataset is stored in a CSV file with the following structure: (Note: Revise the file name accordingly for your setup)
| Question 1 | Question 2 | Question 3 | ... | Decision |
|---|
Label column: TriaSenseLabel
Valid labels: BLUE_Observe, GREEN_Routine, YELLOW_Priority, RED_Urgent
- Each question column contains integer values (0-3) representing the user's response
- The
TriaSenseLabelcolumn contains the target variable (BLUE_Observe, GREEN_Routine,YELLOW_Priority, RED_Urgent) - Each row represents a patient record
-
Navigate to
srcdirectory. Create a virtual environment, activate it, and install the required libraries.For MacOS:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txtFow Windows:
python -m venv .venv .venv/Scripts/Activate pip install -r requirements.txt
-
Use
src/TriaSense_laptop.pyto train your decision tree and convert it to C++ for ESP32. -
Wire your ESP32 with buttons and OLED display. An example is shown in the figure below. Update the sketch
TriaSense.inoaccordingly, depending on how you wire the TriaSense.
- Play with TriaSense. Sketch the workflow of TriaSense.
- What additional sensors or hardware could enhance the user experience?
- Does decision tree remain suitable for your choice of new sensors? If yes, carefully justify your answer. If not, what ML model would you use and explain why.
- How would you pitch TriaSense to a rural hospital administrator?
- What are potential privacy or data ownership concerns when recording triage data in rural contexts?
- How do technical constraints, user needs, and business realities interact in shaping TriaSense’s design?
- What cultural or social biases might emerge in the question phrasing or decision rules?
- How do technical constraints, user needs, and business realities interact in shaping TriaSense’s design?
