Project-Pilluma

OLED Eyes Animation Script

WORK IN PROGRESS!!!

Started as a cozmo/vector like eye plugin for the pwnagotchi, based on the FluxGarage RoboEyes Library for arduino. I try to translate the arduino libraries features to python as a framework for displaying the pwnagotchis mood on an oled screen, that can be used for many other projects as well. To make it flexible it is using the luma libraries for display handling, and PIL for drawing the frames from primitives (rounded rectangles, polygons etc.). It supports configurable screen settings, eye shapes, and a variety of animations, including eye movement, blinking, face expressions, and more. The script is designed to be modular and customizable through configuration files.

Implemented features:

Future plan:

Features:

Configurable Screen Parameters:

Debugging and Logging: TURNED OFF MOST OF IT FOR NOW

Dynamic Eye Animations:

Curious Mode:

Wakeup Animation:

Available Animation Commands and Parameters

Prerequisites and installation

Don’t follow this to the point, these are basically notes for myself for now!!

Python 3.7 or later luma.core, luma.oled and luma.lcd PIL (Python Imaging Library)

sudo apt install python3-pip python3-setuptools python3-dev python3-pantilthat
git clone https://github.com/rm-hull/luma.core.git
cd luma.core
pip install -r requirements.txt
sudo python3 setup.py install
cd~
git clone https://github.com/rm-hull/luma.oled.git
cd luma.oled
pip install -r requirements.txt
sudo python3 setup.py install
cd~
git clone https://github.com/rm-hull/luma.lcd.git
cd luma.lcd
pip install -r requirements.txt
sudo python3 setup.py install

Modify config.txt in /boot/fiirmware/ for higher I2C speeds:

dtparam=i2c_arm=on,i2c_arm_baudrate=400000

BOM

pan tilt hat: https://thepihut.com/products/pan-tilt-hat?variant=696837832721

there is no head pack now but can bought separately: https://thepihut.com/products/mini-pan-tilt-kit-assembled-with-micro-servos?variant=27739702673

stemmaqt oled screen: https://thepihut.com/products/adafruit-monochrome-1-12-128x128-oled-graphic-display-stemma-qt-qwiic?variant=41322023583939

stemma cable with female connectors to connect the screen: https://thepihut.com/products/stemma-qt-qwiic-jst-sh-4-pin-cable-with-premium-female-sockets-150mm-long

male headers for the pantilt hat (works with friction fit but I will solder it): https://thepihut.com/products/break-away-0-1-36-pin-strip-right-angle-male-header-10-pack

And all of it is on a pi3A+ with the geekworm case https://geekworm.com/products/p88?srsltid=AfmBOopiZOh1NuZKwYpvqdJRQvj6jh4go5El5dudx6dtSsQ94RDZkZkV

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details.