Skip to content

Instantly share code, notes, and snippets.

#include <Adafruit_ZeroDMA.h>
#include <TFT_eSPI.h>
#include "AtWiFi.h"
#include"Free_Fonts.h"
TFT_eSPI tft;
const char* ssid = "******";
const char* password = "*******";
@stecman
stecman / _readme.md
Last active May 25, 2024 14:23
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.

@toyowata
toyowata / How-to-add-new-DAPLink-target.MD
Last active April 19, 2020 13:34
DAPLink 新規ターゲットの追加
# 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
@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;
@sgk
sgk / ir_send.ino
Last active December 11, 2015 10:19 — forked from ytsuboi/ir_send.ino
/*
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2013 Yoshihiro TSUBOI <ytsuboi-at-gmail.com>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
@zenorocha
zenorocha / README.md
Last active May 28, 2024 08:23
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@ponkore
ponkore / memo.sh
Created August 3, 2012 05:19
github上でgithubにフォークしたリモートリポジトリを本家リモートリポジトリに追随する
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ
# github fork 追従 で見つけた
$ git remote
origin
# 本家のリモートリポジトリの短縮名を登録する.
$ git remote add github git://github.com/liquidz/misaki.git
# 本家の更新をローカルで反映させる.
@sgk
sgk / job.sh
Created June 25, 2012 17:04
Simple backup script
#!/bin/sh
export PATH=/usr/sbin:/sbin:$PATH
export TZ=Asia/Tokyo
export LANG=en
SERVERHOST=mybackupserver.example.com
SERVERLOGIN=mybackup
SERVER="$SERVERLOGIN@$SERVERHOST"
WEEKDAY=$(date +%a)
@Shinichi-Ohki
Shinichi-Ohki / version_identifer_test.ulp
Last active October 6, 2015 06:38
Identify Eagle version in your ULP. (ULPからEAGLEのバージョンを知る方法)
CadsoftのEagleでは、ユーザープログラム(User Language Program,ULP)内で#requireディレクティブを使うことにより、ULPの動作するEagleのバージョンを制限することができます。
EagleのバージョンごとにULPの動作を変えたいときなどにバージョン番号が必要となるため、取得する方法を載せておきます。
定数EAGLE_VERSION、EAGLE_RELEASE、EAGLE_SIGNATUREを参照して文字列を作り、ダイアログボックスに表示します。
Eagleが提供している組み込み定数の詳細はulpマニュアル(ulp640_en.pdf.pdf)の67ページ以降(Builtin Constantsの章)を参照してください。