Skip to content

Instantly share code, notes, and snippets.

@sgk
sgk / EAGLE.SCR
Last active December 20, 2015 12:18
EAGLE.SCR
# Configuration Script
#
# This file can be used to configure the editor windows.
# GENERAL:
# Switch Science
ASSIGN C+0 WINDOW FIT;
ASSIGN F7 MOVE;
ASSIGN F8 ROUTE;
# Install the PXT for micro:bit target on Ubuntu 16.04
# https://github.com/Microsoft/pxt-microbit
Install the latest nodejs
$ wget https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-x64.tar.xz
$ tar xJf node-v4.4.7-linux-x64.tar.xz
$ mv node-v4.4.7-linux nodejs
$ PATH=~/nodejs/bin:$PATH
$ rm node-v4.4.7-linux-x64.tar.xz
@toyowata
toyowata / How-to-add-new-DAPLink-target.MD
Last active April 19, 2020 13:34
DAPLink 新規ターゲットの追加
@stecman
stecman / _readme.md
Last active July 1, 2025 14:32
Brother P-Touch PT-P300BT bluetooth driver python

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

#include <Adafruit_ZeroDMA.h>
#include <TFT_eSPI.h>
#include "AtWiFi.h"
#include"Free_Fonts.h"
TFT_eSPI tft;
const char* ssid = "******";
const char* password = "*******";