Python script for printing to the Hanshow price-tag

Overview

This repository contains Python code for talking to the ATC_TLSR_Paper open-source firmware for the Hanshow e-paper pricetag.

Installation

# Clone the repository.
$ git clone [email protected]:rbaron/pricetag-printer.git
$ cd pricetag-printer
# Create a virtualenv on venv/ and activate it.
$ virtualenv --python=python3 venv
$ source venv/bin/activate
# Install requirements from requirements.txt.
$ pip install -r requirements.txt

Usage

$ python print.py --help
usage: print.py [-h] [--devicename] [--log-level {debug,info,warn,error}] [--img-binarization-algo {mean-threshold,floyd-steinberg}] [--show-preview] filename

sends an image to the EPD BLE service running in the ATC_TLSR_Paper Hanshow open source firmware.

positional arguments:
  filename

optional arguments:
  -h, --help            show this help message and exit
  --devicename          Specify the Bluetooth device name to search for. Default value is GT01.
  --log-level {debug,info,warn,error}
  --img-binarization-algo {mean-threshold,floyd-steinberg}
                        Which image binarization algorithm to use.
  --show-preview        If set, displays the final image and asks the user for confirmation before printing.

Example

% python print.py --show-preview test.png
âŗ Applying Floyd-Steinberg dithering to image...
✅ Done.
ℹī¸ Displaying preview.
🤔 Go ahead with print? [Y/n]?
✅ Read image: (42, 384) (h, w) pixels
✅ Generated BLE commands: 2353 bytes
âŗ Looking for a BLE device named GT01...
✅ Got it. Address: 09480C21-65B5-477B-B475-C797CD0D6B1C: GT01
âŗ Connecting to 09480C21-65B5-477B-B475-C797CD0D6B1C: GT01...
✅ Connected: True; MTU: 104
âŗ Sending 2353 bytes of data in chunks of 101 bytes...
✅ Done.
Switch predictor for Home Assistant with AppDeamon

Home Assistant AppDeamon - Event predictor WORK IN PROGRESS - CURRENTLY NOT COMPLETE AND NOT WORK This is an idea under development (when I have free

37 Dec 17, 2022
Ha-rpi gpio - Home Assistant Raspberry Pi GPIO Integration

Home Assistant Raspberry Pi GPIO custom integration This is a spin-off from the

Shay Levy 98 Dec 24, 2022
A custom mechanical keyboard inspired by the CFTKB Mysterium

Env-KB A custom mechanical keyboard inspired by the CFTKB Mysterium Build Guide and Parts List What is to do? Right now for the first 5 PCBs I have, i

EnviousData 203 Jan 04, 2023
Keystroke logging, often referred to as keylogging or keyboard capturing

Keystroke logging, often referred to as keylogging or keyboard capturing, is the action of recording the keys struck on a keyboard, typically covertly, so that a person using the keyboard is unaware

Bhumika R 2 Jan 11, 2022
It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history.

HWLogger It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history. Sample Usage Run HW

Xeros 0 Apr 05, 2022
A python library written for the raspberry pi.

A python package for using certain components on the raspberry pi.

Builder212 1 Nov 09, 2021
Kwcpu - An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores.

kwcpu An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores. kwcpu is provided as a Rainmeter skin. By default

Jay Oster 2 Nov 07, 2022
Watson-Assistant with integration capabilities

Watson-Assistant-Integration Watson-Assistant with integration capabilities "main.py" should be deployed as Cloud Function (Action) on IBM Cloud. For

Sergey Usachev 1 Dec 20, 2021
Python script: Enphase Envoy mqtt json for Home Assistant

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once

29 Dec 27, 2022
Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Liam Goss 11 Sep 24, 2022
Component for deep integration LedFx from Home Assistant.

LedFX for Home Assistant Component for deep integration LedFx from Home Assistant. Table of Contents FAQ Install Config Performance FAQ Q. What versio

Dmitry Mamontov 28 Dec 13, 2022
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

3 Nov 27, 2022
Cascade Drone Swarm Physical Demonstration Project

Cascade Drone Swarm Physical Demonstration Project Table of Contents About The Project Built With Getting Started Prerequisites Installation About The

3 Aug 24, 2022
Toy robot that traverses on a finite surface

Toy Robot Challenge - Release Notes November 12, 2021 New features Initialisation - Users can set the home position and heading of the robot. Position

Ze Fei Teo 0 Feb 03, 2022
An open source two key macro-pad modeled to look like a cartoony melting popsicle

macropopsicle An open source two key macro-pad modeled to look like a cartoony melting popsicle. Build instructions Parts List -1x Top case half (3D p

17 Aug 18, 2022
Imbalaced Classification and Robust Semantic Segmentation

Imbalaced Classification and Robust Semantic Segmentation This repo implements two algoritms. The imbalance clibration (IC) algorithm for image classi

24 Jul 23, 2022
The project is an open-source and low-cost kit to get started with underactuated robotics.

Torque Limited Simple Pendulum Introduction The project is an open-source and low-cost kit to get started with underactuated robotics. The kit targets

34 Dec 14, 2022
Sleep Functionality for Adafruit MacroPad RP2040

Adafruit-MacroPad-RP2040 Sleep Functionality for Adafruit MacroPad RP2040 Details This is a modification of AdaFruit project bundle found here specifi

9 Dec 18, 2022
A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

SOLO Motor Controllers 3 Apr 29, 2022
This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

Stanford Student Robotics 1.2k Dec 25, 2022