Skip to content

Create a giant pom pom to hug that sends weird ASCII art and esoteric messages to a local and remote e-ink displays. Build with a Raspberry Pi 3B, Adafruit QT Py ESP32-S2, MQTT & JavaScript!

traumverloren/pompom-love-notes-chatgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hug a giant pom pom to send esoteric messages to an e-ink display

See what esoteric art & messages it displays on the mastodon bot:

https://mastodon.social/@giantpompom

Ever wanted to spend days winding a ton of yarn to make a giant pom pom? What that pom pom to be able to react to hugging to send cryptic ASCII art and a short esoteric message to multiple e-ink displays? Don't have the latest PI due to the shortages but have an old RPI lying around?

Well, here ya go!

pompom-schematic

Materials:

Pom pom:

Create the giant pom pom (this took ~20 x 50g bundles of yarn):

pompom-small

Make sure to put in a small container to hold the microcontroller (& battery inside):

pompominside Medium

RPi + E-ink:

  • Waveshare 7.5 e-ink screen w/ Pi HAT
  • Raspberry Pi (Works with multiple, but I used an old RPi 3)
  • Picture frame (there's one that works from ikea or this one from modulor)

Mount e-ink display & pi into a picture frame:

IMG_4919 Medium

6DD1C812-F45E-4DD4-B626-C3976EF0C59E Medium

RPi Setup:

  • format sd card w/ raspberry pi imager
  • install nvm (curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash)
  • install node using nvm (nvm install --lts)
  • npm i
  • npm start
  • Add a .env file with secrets:
    OPENAI_API_KEY
    MQTT_HOST  # broker url
    MQTT_USER
    MQTT_PASSWORD
    CLIENT_ID
    TOUCH_TOPIC
    OPENAI_CONTENT # your prompt

QT PY ESP-32 Setup:

  • Download .uf2 file: CircuitPython 8.2.0-beta (Necessary for touchalarm functionality!)
  • Put in bootmode and drag/drop circuitpython to drive in finder view
  • Using MU editor, create a settings.toml file with following secrets:
    ssid=""
    wifi_pw=""
    broker=""
    port=
    user=""
    pw=""
    client_id=""
    topic=""
  • Add necessary dependencies to lib folder from Adafruit circuitpython bundle:
    • [adafruit_minimqtt](https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT) (copy entire folder)

Optional:

To launch on boot using systemd:

  • Make sure node and npm are symlink since we use nvm:

    sudo ln -s "$(which node)" /usr/bin/node
    sudo ln -s "$(which npm)" /usr/bin/npm
    
  • Setup a eink.service file:

    sudo nano /lib/systemd/system/eink.service

    with:

    [Unit]
    Description=chatgpt ascii art displayer
    After=network-online.target
    Wants=network-online.target
    
    [Service]
    Type=simple
    User=pi
    WorkingDirectory=/home/pi/love-notes-chatgpt
    ExecStart=/usr/bin/npm start
    Restart=on-failure
    RestartSec=30
    
    [Install]
    WantedBy=multi-user.target
    
  • Test the config:

    sudo systemctl start eink

  • Check for errors in log:

    sudo journalctl -xfu eink

  • If need to edit, restart it with:

    sudo systemctl daemon-reload

  • Restart it:

    sudo systemctl restart eink

  • To stop:

    sudo systemctl stop eink

  • To enable it once it looks good:

    sudo systemctl enable eink and sudo reboot

About

Create a giant pom pom to hug that sends weird ASCII art and esoteric messages to a local and remote e-ink displays. Build with a Raspberry Pi 3B, Adafruit QT Py ESP32-S2, MQTT & JavaScript!

Topics

Resources

Stars

Watchers

Forks