Skip to content

kl527/emotion_gun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emotion Gun Software

This is the software for the Adafruit MEMENTO camera to perform real-time emotion recognition using the Hume.ai API.

Files

  • code.py: File to replace the code.py in the MEMENTO camera.
  • code_with_button.py: File to replace the code.py in 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.

Dependencies

  • Python 3
  • circup for managing CircuitPython libraries
  • Adafruit MEMENTO (ESP32-S3 Camera)
  • Data-capable USB-C cable
  • CircuitPython 9.0.0 or later
  • adafruit_pycamera library

Usage

1. Install circup

Make sure that you have circup installed in your Python environment:

pip3 install circup

2. Flash CircuitPython to MEMENTO

  1. Download the MEMENTO CircuitPython .uf2 file: https://circuitpython.org/board/adafruit_esp32s3_camera/

  2. Connect the board via USB-C (data cable required).

  3. Enter bootloader mode:

    • Hold BOOT / Shutter
    • Tap RESET
    • Release both
  4. A drive named CAMERABOOT will appear. Drag the .uf2 file onto it.

  5. The board reboots automatically and mounts as:

CIRCUITPY

3. Install Libraries with circup

With your CircuitPython device connected, install the required library:

circup install adafruit_pycamera

To update all installed libraries:

circup update

4. Run Your Program

  1. Copy your code.py file to the root of CIRCUITPY.
  2. Eject the drive.
  3. Press RESET or power-cycle the board to run.

Architecture

  1. 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.txt files.

  2. 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.

  3. emotion_gun_mac_app.py - macOS test version: desktop testing environment for Hume.ai integration using local image files and HTTP requests.

About

Software for the Adafruit MEMENTO camera to perform real-time emotion recognition using the Hume.ai API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages