Arduino Coding iOS Projects Swift SwiftUI

Flip Dots!

I saw flip dots (also called flip discs) last year for the first time and instantly knew I needed some in my life. If you’re not familiar with them, check out how they work!

The particular model I have is the ALFAZETA XY5, which may be the easiest way to get up and running, but certainly not the least expensive.

After getting the board, all you need is:

  1. 24V power supply
  2. Something that talks over RS485 (in my case I used an ESP8266 connected to a MAX3485 board)
  3. Their documentation that defines the controller data protocol

I plan to write in more detail how it all works, but for this demo the stack is:

  1. SwiftUI app that runs SwiftGFXWrapper (which is mainly Adafruit’s GFX Library under the hood)
  2. The app sends the entire pixel buffer over UDP to the ESP8266
  3. The ESP8266 sends data to the XY5 over RS485 using their controller’s protocol
Projects Swift SwiftUI

Playground support for SwiftGFXWrapper

For even easier prototyping, I’ve added Swift Playground support to my SwiftGFXWrapper project!

Projects Swift SwiftUI

Adafruit GFX -> Swift

Another fun project from a few weekends ago: Wrapping the Adafruit GFX in Objective C and bridging to Swift for some neat 8-bit effects!

The most interesting component of this project so far has been building a Swift closure that is executed in C as a const void *. This was new territory for me and a lot of fun to figure out!

This (work in progress) repo has been open sourced!

Projects Swift SwiftUI

Retro Menu Bar calculator

I’ve always wanted to play around with Menu Bar apps, so I decided to make an easy to access retro calculator in SwiftUI.


Diving into SwiftUI

Arduino Projects Raspberry Pi Swift

Controlling the Rover’s camera with an iPad gyroscope

The Rover got its own iOS app and I implemented a neat way to control the camera servos.

Processing Swift

More iPhone X Depth Sensor Fun

Processing Swift

iPhone X Depth Sensor to

This was a fun challenge (and a total hack). In the end it wasn’t that sophisticated, but it was a good exercise in UDP as well as data compression.
Projects Swift

Samantha’s App

Arduino Projects Swift

The start of a project: SafeEject

The time has come: My 2009 Mac Pro has been retired and replaced with a 2016 MacBook Pro. Not only has the temperature in my home office dropped about 4°F, but I can now run the latest macOS, Xcode, and Docker, which I need for work (for that money stuff). I held on to the Mac Pro as long as I could, though, and I can confidently say that the “cheese grater” desktop is the best machine I’ve ever purchased.

A new setup presents new challenges. One issue I’ve found is switching states between “docked” and “undocked”. I put this in quotes since Apple doesn’t have a true docking station solution. Because of this it’s way too easy to rip out the USB connectors when “undocking”, which could lead to a dirty removal of a volume (e.g. something hasn’t been flushed out of cache to the actual hardware yet and data is corrupted / lost). Since I have a Time Machine drive connected at my desk, this can happen if I don’t remember to eject it from Finder.

I think this process would be easier with an external button to do the work for me before disconnecting the laptop. Currently in the hack phase, I’ve wired up an Arduino with an RGB pushbutton that communicates to a macOS app. When it’s time to undock I simply press the button to unmount all volumes and get visual feedback that it’s safe to pull the plugs…