Point. Press. Watch the magic happen.
PixelPotion is an AI-powered Raspberry Pi camera that instantly transforms your photos into any artistic style — Pixar 3D, anime, watercolor, oil painting, or anything you can imagine. Press a physical button, and seconds later the original photo plus the styled version land in your Telegram chat. No cloud subscriptions, no apps, no fuss — just pure potion-powered creativity.
Built for makers, photographers, and anyone who wants to add a spark of magic to their memories.
- Any art style — Pixar 3D, anime, watercolor, comic book, cyberpunk, oil painting, and more. If you can describe it, Gemini can paint it.
- Physical button trigger — One-press shooting with a GPIO button, no phone needed.
- Instant Telegram delivery — Both the original and styled image arrive in your chat automatically.
- Offline queue — No WiFi? No problem. Photos are saved and processed the next time you connect.
- Web configuration portal — Set up WiFi, API keys, and styles from any browser on your phone or laptop.
- Custom styles — Create unlimited styles with your own Gemini prompts directly from the web UI.
- Standalone hotspot — Creates its own WiFi access point (
PixelPotion-Setup) for initial configuration — no router needed.
| Component | Details |
|---|---|
| Raspberry Pi Zero 2 W | Main compute board |
| Raspberry Pi Camera Module v2.1 | 8 MP still camera |
| Push button (momentary) | Physical shutter trigger |
| 2x female-to-female jumper wires | Button connections |
| Camera flex cable (Pi Zero) | Included with camera — verify Zero size |
| 5V 2.5A micro-USB power supply | Stable power for the Pi |
| microSD card 16 GB+ | Raspberry Pi OS storage |
- Power off the Raspberry Pi
- Lift the camera connector latch on the Pi Zero 2 W
- Insert the camera flex cable (contacts facing down)
- Press the latch closed firmly
⚠️ The Pi Zero 2 W uses a smaller camera connector than the full-size Pi. Make sure your flex cable is the correct size.
Connect the push button between these two GPIO pins:
Pin 11 (GPIO17) ←──[ BUTTON ]──→ Pin 9 (GND)
Raspberry Pi Zero 2 W - Pinout:
┌─────────────────────────────────┐
│ (1) 3.3V (2) 5V │
│ (3) GPIO2 (4) 5V │
│ (5) GPIO3 (6) GND │
│ (7) GPIO4 (8) GPIO14 │
│ (9) GND ◄── (10) GPIO15 │
│ (11) GPIO17◄ (12) GPIO18 │
│ ... │
└─────────────────────────────────┘
▲
└── Pin 11 = GPIO17 (button signal)
No pull-up resistor needed — the software enables it internally.
- Download Raspberry Pi Imager
- Select Raspberry Pi OS Lite (64-bit) (Bookworm)
- Open advanced options (⚙️) and configure:
- Hostname:
pixelpotion - Username:
pi/ set a password - Enable SSH: ✅
- WiFi: set your home network temporarily for installation
- Hostname:
- Flash the image to the microSD card
- Insert the microSD into the Pi Zero 2 W
-
Power on the Pi and wait ~2 minutes
-
Find the Pi's IP on your router or try:
ping pixelpotion.local
-
Connect via SSH:
ssh pi@pixelpotion.local
From your computer, copy the project to the Pi:
# Run from the folder containing the project files
scp -r ./* pi@pixelpotion.local:/home/pi/pixelpotion-install/Or clone directly on the Pi if you pushed it to GitHub:
mkdir -p /home/pi/pixelpotion-install
cd /home/pi/pixelpotion-install
git clone https://github.com/yourusername/pixelpotion .cd /home/pi/pixelpotion-install
sudo bash install.shThe script will:
- Update system packages
- Install all dependencies (Python, camera, GPIO)
- Configure
hostapdanddnsmasqfor the access point - Install and enable the
pixelpotionsystemd service - Enable the camera interface
sudo rebootAfter reboot, the Pi creates its own WiFi network:
| Field | Value |
|---|---|
| Network name | PixelPotion-Setup |
| Password | pixelpotion123 |
Connect from your phone or laptop.
http://192.168.4.1:8080
In the WiFi Settings section:
- Click Scan networks to list available networks
- Select your network or type the SSID
- Enter the password
- Click Connect to WiFi
After connecting, the Pi stops acting as an access point. Access the portal via its new IP or
http://pixelpotion.local:8080.
- Go to aistudio.google.com/apikey
- Sign in with your Google account
- Click Create API Key
- Copy the key (starts with
AIza...) - Paste it into the Google Gemini API Key field in the portal
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a name (e.g. "My PixelPotion")
- Choose a username (e.g.
my_pixelpotion_bot) - BotFather will give you a token like:
123456789:ABCdefGhIjKlMnOpQrStUvWxYz - Paste it into Telegram Bot Token
- Search for @userinfobot in Telegram
- Send it any message
- It replies with your Chat ID (a number like
123456789) - Paste it into Telegram Chat ID
For groups: Add the bot to the group, then use
@getidsbotto get the group Chat ID (starts with-100...).
- Click Save Configuration
Press the push button. The pipeline runs automatically:
- 📸 Captures the photo
- 🧪 Sends it to Gemini AI (Nano Banana) for style transformation
- 📨 Delivers both photos (original + styled) via Telegram
Click the large 📸 button on the main page. Select a style first using the style pills.
If there is no WiFi when a photo is captured:
- The photo is saved to the pending queue
- Go to the Gallery tab when you have WiFi
- Process photos individually or all at once
Open the Styles tab in the web portal to:
- Switch the active style
- Create custom styles with your own Gemini prompts
- Edit or delete existing styles
Prompt tips for best results:
- Start with:
TASK: Transform this photograph into... - Ask explicitly for people to remain recognizable
- Describe indoor and outdoor background handling
- Include:
No text, watermarks, or logos - End with:
OUTPUT: Generate the transformed image now.
pixelpotion/
├── app.py # Main application
├── constants.py # AI models, retry count; loads DEFAULT_CONFIG from JSON
├── default_config.json # Factory defaults: AP credentials, styles, prompts
├── requirements.txt # Python dependencies
├── install.sh # Installer script for Raspberry Pi
├── config/
│ ├── hostapd.conf # Access point configuration
│ ├── dnsmasq.conf # DHCP/DNS configuration for AP
│ └── pixelpotion.service # systemd service unit
└── templates/
├── index.html # Capture & configuration portal
├── styles.html # Style management
└── gallery.html # Pending photos gallery
/home/pi/pixelpotion/
├── app.py
├── constants.py
├── default_config.json
├── config.json # Runtime config (API keys, WiFi) — gitignored, auto-created
├── pixelpotion.log # Application logs — gitignored
├── requirements.txt
├── templates/
│ ├── index.html
│ ├── styles.html
│ └── gallery.html
└── photos/
├── original/ # Raw captured photos
├── processed/ # AI-styled output photos
└── pending/ # Photos waiting for WiFi
Configuration files explained:
| File | Purpose | In git |
|---|---|---|
default_config.json |
Factory defaults — AP name, built-in styles and prompts, GPIO pin | ✅ Yes |
config.json |
Runtime state — your API keys, WiFi credentials, active style | ❌ No (gitignored) |
On first run, config.json does not exist and all values fall back to default_config.json. Once you save anything through the web portal, config.json is created and takes precedence. You can safely edit default_config.json to change the built-in styles or AP defaults before deploying to a new device.
Open http://<PI_IP>:8080 and update the fields directly.
ssh pi@pixelpotion.local
nano /home/pi/pixelpotion/config.jsonUpdate the relevant fields:
{
"gemini_api_key": "YOUR_NEW_KEY_HERE",
"telegram_bot_token": "YOUR_NEW_TOKEN_HERE",
"telegram_chat_id": "YOUR_NEW_CHAT_ID_HERE"
}Then restart the service:
sudo systemctl restart pixelpotion# Stream live logs
sudo journalctl -u pixelpotion -f
# Service status
sudo systemctl status pixelpotion
# Restart PixelPotion
sudo systemctl restart pixelpotion
# Stop PixelPotion
sudo systemctl stop pixelpotion
# Test the camera manually
libcamera-still -o test.jpg
# Check current IP
hostname -I- Verify the camera cable is properly seated
- Test with:
libcamera-still -o test.jpg - If it fails, reseat the flex cable and reboot
- Verify the API key is valid in the portal
- Image generation models may have free-tier rate limits — wait a moment and retry
- Check logs:
sudo journalctl -u pixelpotion -f
- Verify the bot token is correct
- Make sure you've sent at least one message to the bot first
- For groups, the bot must be a member
- Wait 30–60 seconds after boot
- If the network doesn't appear, reboot the Pi
- Network:
PixelPotion-Setup, password:pixelpotion123
- In AP mode:
http://192.168.4.1:8080 - In WiFi mode:
http://pixelpotion.local:8080 - Check service is running:
sudo systemctl status pixelpotion