This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
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.
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.
#!/bin/sh | |
# This self-executing Java program uses the following /embedded shell script/ to compile & execute itself.. | |
# magic constant holding length of script | |
SKIP=26 | |
# parse our name.. | |
FILE=`basename $0 .java` | |
# get some working space, clean up old crud |
package hello.client; | |
import com.google.gwt.core.client.*; | |
import com.google.gwt.user.client.ui.*; | |
@GwtModule(renameTo="basic") | |
public class YourEntryPoint implements EntryPoint { | |
@Override | |
public void onModuleLoad() { | |
Button button = new Button("Click me"); |
import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY; | |
import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME; | |
import static jsinterop.annotations.JsPackage.GLOBAL; | |
import com.fasterxml.jackson.annotation.JsonIgnore; | |
import com.fasterxml.jackson.annotation.JsonSubTypes; | |
import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
import com.fasterxml.jackson.annotation.JsonTypeName; | |
import javax.annotation.Nullable; | |
import jsinterop.annotations.JsOverlay; |
This is a post to satisfy your curiosity about alternative keyboard layouts, why some people use them, and whether they're for you. It is intended to discuss the topic in broad terms, but I will share my personal preferences towards the end. Due to time constraints and my own limited knowledge, I will focus on layouts optimized for the English language (ANSI variants, with an occasional nod to ISO).
First off, it's important to understand how much debate there is about how we got here: I will not even attempt to settle the issue of who invented the 'first' typewriter layout, because the modern device had many predecessors going back centuries. The usual legend of typewriter evolution holds that American Christopher Latham Sholes debuted the typewriter in 1868 with a 2-row layout that was (nearly) alphabetical. A horizontal stagger between the rows made room for the lever arms attached to each key:
3 5 7 9 N O P Q R S T U V W X Y Z
2 4 6 8 . A B C D E
The CHIP-8 emulator guide has now been finalized and published on my blog.
Please go here to read it: https://tobiasvl.github.io/blog/write-a-chip-8-emulator/
The Markdown source is located here: https://github.com/tobiasvl/tobiasvl.github.io/blob/master/_posts/2020-07-20-write-a-chip-8-emulator.md
If you have this link I'll assume I should thank you for your valuable input while I was writing it. Feel free to continue making suggestions/pull requests over at GitHub!