Coder Social home page Coder Social logo

printi-client-esp32's Introduction

Run

To flash using USB:

pio run --target upload -e lolin_s2_mini-usb

Because we need the USB port to talk to the printer, the ESP32-S2 needs to be put into bootloader mode for flashing by holding the BOOT button while pressing RESET. For more information, see https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/dfu.html.

HTTPS OTA

The printis of this world try to get new firmware from the highly optimized global printi CDN at startup. To release:

pio run -e lolin_s2_mini-usb && scp .pio/build/lolin_s2_mini-usb/firmware.bin ndreke.de:~/www/dump/printi-firmware.bin

Note that the printi will flash itself only if the version tag on the server is different from the one currently running. The version tag is added to the firmware and derived from the latest git commit hash. For more details, see the PlatformIO config file.

How to build a printi

If you want to build one more or less exactly like Leon did, you will need:

  • a HOIN HOP-H58 receipt printer (less than 30€)
  • a LD1117V33 voltage regulator
  • a Lolin S2 Mini board
  • a USB-C to USB-A OTG adapter
  • wires, soldering iron, screwdriver, multimeter, hotglue --- the usual stuff.

All in all, if you build 10 of these printers, each can be had for <30€.

First, open the printer and solder wires to the 12V power lines. I forget which one is which, just measure:

Power wire 1 Power wire 2

Solder the two wires to the correct pins on the voltage regulator, and drill a hole for the the wires with the resulting 3.3V from the regulator. Note how I tied a little knot so that the wires won't be torn off from the regulator in time. I secured the regulator with hot glue.

Regulator installation

Solder the 3.3V power lines to the ESP32 printi brain on the outside. Measure before you solder, reversing the voltage will fry the ESP32 (yes, I did).

Printi brain

Finally, flash the firmware (unplug the printi before!), connect up the printer with the OTG adapter and wait for instructions to be printed. Happy printi printi!

Assembly done

printi-client-esp32's People

Contributors

leonhandreke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.