Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 2.21 KB

File metadata and controls

98 lines (70 loc) · 2.21 KB

Quick Start Guide

1. Prepare the Print File

Place your clean.prn file (825KB) in the project root directory.

2. Generate SPIFFS Image

Windows (PowerShell - Recommended):

.\prepare_spiffs.ps1

Windows (Command Prompt):

prepare_spiffs.bat

Manual Method:

mkdir spiffs_data
copy clean.prn spiffs_data\
python %IDF_PATH%\components\spiffs\spiffsgen.py 1769472 spiffs_data spiffs_image.bin --page-size 256 --block-size 4096

3. Build and Flash

Replace COM3 with your actual COM port:

# Set target to ESP32-S3
idf.py set-target esp32s3

# Build the project
idf.py build

# Flash firmware and partitions
idf.py -p COM3 flash

# Flash SPIFFS image
esptool.py --chip esp32s3 --port COM3 --baud 460800 write_flash 0x150000 spiffs_image.bin

# Monitor output
idf.py -p COM3 monitor

4. What to Expect

The ESP32 will:

  1. Connect to printer WiFi Direct (your SSID from config.h)
  2. Send print job to printer on port 9100
  3. Print 4 colored squares
  4. Enter deep sleep for 3 days
  5. Wake up and repeat

Configuration

  1. Copy config template: cp main/config.h.example main/config.h
  2. Edit main/config.h with your printer credentials:
#define WIFI_SSID               "YOUR_PRINTER_SSID"
#define WIFI_PASS               "YOUR_PRINTER_PASSWORD"
#define PRINTER_IP              "192.168.114.1"
#define PRINTER_PORT            9100

Testing Mode

For testing, change sleep time to 1 minute in main/printer_cleaner_main.c:

#define SLEEP_TIME_SECONDS      60  // 1 minute instead of 3 days

Then rebuild and flash:

idf.py build flash

Troubleshooting

Problem Solution
Can't find COM port Use mode (Windows) or check Device Manager
SPIFFS mount failed Re-flash SPIFFS image to 0x150000
WiFi connection failed Verify printer WiFi Direct is enabled
Print job fails Test from PC first (see README)

Power Options

  • USB Powered: Connect to USB power adapter
  • Battery Powered: Use 3.7V LiPo battery with voltage regulator
  • Estimated battery life: 10+ years with 1000mAh battery

For detailed information, see README.md