This is the software for the Adafruit MEMENTO camera to perform real-time emotion recognition using the Hume.ai API.
- code.py: File to replace the
code.pyin the MEMENTO camera. - code_with_button.py: File to replace the
code.pyin the MEMENTO if a button is attached.- Connect button between A0 (or A1, A0 as default) pin and GND on the 3-pin JST connector
- emotion_gun_mac_app.py: File to test out hume.ai on the MacBook.
- Python 3
circupfor managing CircuitPython libraries- Adafruit MEMENTO (ESP32-S3 Camera)
- Data-capable USB-C cable
- CircuitPython 9.0.0 or later
adafruit_pycameralibrary
Make sure that you have circup installed in your Python environment:
pip3 install circup-
Download the MEMENTO CircuitPython
.uf2file: https://circuitpython.org/board/adafruit_esp32s3_camera/ -
Connect the board via USB-C (data cable required).
-
Enter bootloader mode:
- Hold BOOT / Shutter
- Tap RESET
- Release both
-
A drive named
CAMERABOOTwill appear. Drag the.uf2file onto it. -
The board reboots automatically and mounts as:
CIRCUITPY
With your CircuitPython device connected, install the required library:
circup install adafruit_pycameraTo update all installed libraries:
circup update- Copy your
code.pyfile to the root ofCIRCUITPY. - Eject the drive.
- Press RESET or power-cycle the board to run.
-
code.py - MEMENTO camera software: captures photos via shutter button, sends images to Hume.ai API for face emotion detection, displays top 2 emotions on screen, saves results to
*_EMOTIONS.txtfiles. -
code_with_button.py - Extended version with external button support (A0 pin): adds hardware trigger for photo capture + automatic emotion analysis, includes all base functionality.
-
emotion_gun_mac_app.py - macOS test version: desktop testing environment for Hume.ai integration using local image files and HTTP requests.