fogbound.net




Wed, 2 Jan 2019

Using Makefiles for Teensy Development on Mac OS

— SjG @ 9:24 am

Even if you don’t want to use the Arduino IDE for building your application, or want to do fancy things that only the evil, convoluted syntax of Makefiles can provide, you can do Teensy development on the Mac from the command line. While there are a lot of guides out there on how to do it, I hadn’t seen a complete step-by-step set of instructions.

So with no further ado, here are the steps for building Teensy applications on Mac OS using the Makefiles and the mighty command line.

  1. Download the Arduino IDE from https://www.arduino.cc/en/main/software and install it.
  2. Download Teensyduino from https://www.pjrc.com/teensy/td_download.html and install it.
  3. Download a “basic project template” for Teensy. The original is at https://github.com/apmorton/teensy-template but I’ve been using the fork at https://github.com/a-j-f/teensy-template which has been updated more recently and uses the Teensy CLI Loader for uploading to the device.
  4. Update the Makefile to set your Teensy model
  5. Type make to build, or make upload to install on your Teensy

If you’re wanting to monitor the serial console of your Teensy over USB, install a terminal program like CoolTerm. Alternatively, if you use Homebrew or MacPorts you can use a console-based terminal program like minicom. Once the USB connector is plugged in, your Teensy will show up as something like /dev/cu.usbmodem45504901. The communications settings will be 115200 baud, 8 bit, no parity, 1 stop bit.



Tue, 1 Jan 2019

WordPress Editors

— SjG @ 11:18 am

I have WordPress automatically updating itself and its plugins using a cron job that uses the magical Word Press CLI. Overall, I’m pretty happy with it. But then, one day, the latest version installed, and my “editing experience” has gone to the new Gutenberg editor.

Now, like all creatures of habit, my first response was “what?!” As I’ve written before, I resist changing things that are otherwise perfectly functional. But then I thought it was an opportunity to work on maintaining that brain plasticity and build some new neural connections. Instead of immediately installing the plugin that allows me to keep the old editor, I’d give the new one a try.

Initially, it did not go well.

I saw the new interface, but the little button to add blocks was grayed out. A single “Title” field and “Text” area appeared, and I could enter data into them, but I couldn’t add new blocks. The javascripty-pop-ups didn’t.

So I looked at the JavaScript console, expecting to see an error from a misloaded source file or some bug. Nothing. I clicked around the interface like an increasingly frustrated monkey for a while, and got nowhere.

Turning to the interwebs for support, I didn’t see much that was helpful. This thread and this one both talked about issues and solutions, none of which seemed to apply. My server is sending proper headers, I don’t have any weird plugins, etc. I checked my user profiles, and they were set to use “Visual Editor.”

It was this last item that was indeed the culprit, though. Unchecking the “Use Visual Editor” and saving my profile, then rechecking the “Use Visual Editor” checkbox and saving my profile fixed things. How fucking annoying. Get out of the car, get back in the car.

In any case, I’m getting used to Gutenberg. I can’t say I like it more or less than the previous editor.