Daniel's Weblog
Posts About
Tags Colophon

Tags / Posts

Wemos D1 Carrier Board

Three years ago I soldered my first custom-designed PCBs, a set of ESP8266-powered temperature sensors for my apartment!

The original design worked with the ESP8266 modules I had at the time but hasn’t with recent modules (I think I forgot to pull the chip-enable wire high?).

Wemos D1 Mini Carrier Board

This is a spinoff project of my dedicated, single-purpose temperature sensor boards. Instead of trying to be as cheap and small as possible it is intended to be an easy way to connect I2C sensors to the Wemos D1 Mini and probably to esphome.

Further documentation on github.com/djbeadle/ESP8266-Temperature-Sensor.

Board

Top

Bottom

Notes

  • Designed in KiCad at NYC Resistor where I first was shown the joy of Esphome (compared to writing your own firmware by!).

  • First PCB order December, 2021.

Pinout Details

  • 4x I2C, two of each arrangment: SDA-SCL-GND-3.3V and SCL-SDA-3.3V-GND (SDA pin D2, SCL pin D1)
  • 2x 1-Wire pinouts arranged as D0-3.3V-GND and 3.3V-D0-GND
  • 1x push-button footprint (3.3V and pin D8)
  • 1x photoresistor & resistor footprint (3.3V, A0, and GND via a resistor footprint, 10k generally works well)
  • 1x footprint for a terminal block connector (Check your specific Wemos D1 Mini information to see what input voltage it is capable of handling on the 5V pin!)


Photo Book Inventory

Photo books I have owned / borrowed in no particular order.

  1. 9780947322120 Dupain’s Sydney by Jill White

  2. 9781884167058 RFK Funeral Train photographs by Paul Fusc

  3. 9780999243008 Just Yannis by Harold Evans and Yannis Behrakis

  4. 9780525560029 Of Love & War by Lynsey Addario

    I also greatly enjoyed her appearance on Radiolab for the episode Sight Unseen.

  5. 9781580931465 Subway Memories by by Camilo José Vergara

  6. 9780714843087 Red Color News Soldier by Li Zhensheng

    Possibily my favorite book on this list so far.

  7. 9781426201981 Photo Nomad by David Douglas Duncan

    This book is a window in to a world that is completly foreign to me, such as this one:

    One hour later—eyes drilling straight into my gizzard—slowly turning my prints—asking had I any snow shots…you know…Santa Claus country…no! How about flying to Boston Monday? I saw that page on Helen and Joe. Have you been in a big plane, TWA’s two-engine job? Take our old company Pontiac - warm clothes - drive through New England shooting whatever you want - BUT - always – remember: leave space for our Merry Christmas to run across the bottom of our next greeting cards.

    Cal Eby was editing my pumpkin story when I went to thank him.

    My snow shots became Hallmark’s first gift box of photographs.

    Many of the captions are completly lost on me but they’re made up for by the photos.

  8. 9781633451049 Dorothea Lange Words and Pictures by Dorothea Lange, Sarah Meister

  9. 9780500292914 Magnum Contact Sheets by Kristen Lubben

Other

  1. 0143128418 It’s What I Do: A Photographer’s Life of Love and War by Lynsey Addario

    My first introduction to Lynsey Addario’s work, I ploughed through this book over a weekend senior year of college.

  2. 1620405555 Group f.64 by Alinder, Mary Street


CLI Tool Diagrams and Notes

A living document of diagrams and notes on various Unix tools.

Tar files and Tarballs Flowchart

A flow chart showing how files are changed with the tar tool.


An Inventory of Annual Mystic Seaport Sea Music Festival Recordings

“Fun isn’t something one considers when balancing the universe collecting sea shanties, but this does put a smile on my face”.

Thanos adds the final Infinity Stone to the Infinity Gauntlet in the movie Avengers Endgame

I will only link downloads of recordings that are not available for sale new (digitally or physically) anywhere.

Info

The List

  1. Wikipedia reports the first as occurring in 1979 but does not provide a source, if assuming one-per-year working backwards from the first recording (#9, 1988), the first should have occurred in 1980.
  2. ✅ 1988, Newly digitized and available on the Internet Archive
  3. Article describing but no audio
  4. 💰 1999, CD available from Mystic Seaport for $14.95
  5. Audio files from CD available for download here
  6. ❌ Description of a CD held in the archive of the San Francisco Maritime Library available here, but no audio files.
  7. Audio files from CD available for download here
  8. 💰 CD available from Mystic Seaport for $14.95
  9. 💰 CD available from Mystic Seaport for $14.95
  10. ❌ Info about at NewEnglandBoating.com including links to two Youtube videos which have been made private.
  11. 💰 CD available from Mystic Seaport for $14.95
  12. 💰 CD available from Mystic Seaport for $14.95
  13. 💰 CD available from Mystic Seaport for $14.95
  14. 💰 CD available from Mystic Seaport for $14.95
  15. 💰 CD available from Mystic Seaport for $14.95
  16. 💰 CD available from Mystic Seaport for $14.95
  17. 💰 CD available from Mystic Seaport for $14.95
  18. 💰 CD available from Mystic Seaport for $14.95

Other Albums that I am Working on Collecting / Digitizing:

  • Stormalong John
    • Any Port In A Storm
    • A Liverpool Packet
    • Through Stormy Seas
      • Acquired digital version (flac), cleaned up metadata, renamed to “Through Stormy Seas” instead of “Through Stormy Weather” because that’s what the album is called on shanty.co.uk/stormalongjohn.html.
      • Embedded the provided album art which is a crop of the painting “On the Dogger Bank, 1846 by Clarkson R.A.”. I don’t know if that was the original cover art or added later. If / when I find a physical copy of my own I will update here.
      • Available for download here
    • Most complete discography seems to be at shanty.co.uk, I haven’t been able to track down a copy of “A Liverpool Packet” anywhere yet, if you have a copy please let me know, my email address is on my homepage.
  • The Shanty Crew
    • Sea Shanties and Sailor Songs
      • Acquired a digital version (mp3).
      • Available for download here

My Job Explained (with Pictures!)

In the beginning there was nothing except a business process (some piece of software that made money) and a database for logs and a few configurable values.

The process developers who built and managed the business process read the logs in the database and occasionally modified the configurable values by hand.

As the business grew subject matter experts were brought onboard. I’m going to call these people who need to make changes to the database but whose job description does not include writing code business users. For a short while they sent their requests to the process developers who made the changes on their behalf.

Of course if a process developer is spending time editing the database by hand they can’t be working on new features. And if the business users understand the business process and know what they want to change why not let them do so directly? So someone whips up a piece of interface software giving the business users a way to access the database without going through the process developers.

Since in this case there are limited advantages to understanding both how the business process functions and how to make a good human interface eventually the development team fractures in to two disparate groups, the existing business process developers and the new interface developers (aka “frontend developers”).

The interface developers spend all day writing software that translates questions and commands from the business users in to something the database can understand. The two ways they add value are by

  1. Allowing business users who do not know how to directly query a database to ask data-driven questions
  2. Providing the same users a safe way to modify the database.

Eventually a business user is hired who says “I’d really like to use SOME VISUALIZATION TOOL” to help analyze this data—this could be Tableau, PowerBI, R, or even Python. This gets plugged in to the database bypassing the interface software and reduces the first way the interface developers create business value (allowing business users to read the database).

This creates an interesting bubble for the interface developers. The business user’s are responsible for the care and feeding of the business process and the process developers have to understand the intricacies of the business process to improve and expand it. But the interface developers are stuck in the middle. Understanding the details of the business process does not make one better at creating a text box that prevents a business user from accidentally entering garbage input.

Afterthought

This section exists to help me explain what my job is to my family (hi mom!).

I’m an interface developer! The interface software is made up of three parts: the backend, an old frontend (AngularJS), and a new frontend (React). The frontends present data in a human-readable format and validates their commands while the backend understands how to communicate with the database.

The old frontend is not going to break tomorrow but is built with aging technology and we can’t keep it around forever. The new frontend runs in parallel and users will bounce back and forth between the two while we slowly migrate the functionality over piecemeal. The most difficult part is ensuring that the switch between frontends is a pleasant, smooth experience. They shouldn’t be the same (the old frontend is indeed old) but they must be similar enough and must load quickly enough to not break a train of thought as the business users navigate between them.


GaiaGPS Custom Maps

GaiaGPS is my my app of choice when hiking, kayaking, and exploring the outdoors in general. I will look at AllTrails for trail descriptions and reviews but on the trail I am always on Gaia.

Two built-in maps that I recommend are the 1900 and 1940 USGS Topo Maps! It’s very cool to look back in time wherever you are.

  1. This useful list of free map servers from Tim Smith at TrailNotes.org. Check out his other cool mapping software while you’re there.

  2. Bing Maps can be added with a free Bing Maps developer key using this free tool by Nathan Cahill

  3. This is a large list of free map sources courtsey of Brendan on the Rokslide forums:

    Data Sources:
    
    ESRI Worldview:
    https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
    
    Stamen Terrain:
    https://tile.stamen.com/terrain/{z}/{x}/{y}.png
    
    Stamen Watercolor:
    https://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg
    
    Strava All:
    https://heatmap-external-b.strava.com/tiles/all/bluered/{z}/{x}/{y}.png
    
    ESRI National Geographic:
    https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}
    
    Google Maps:
    https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}
    
    Google Terrain:
    https://mt1.google.com/vt/lyrics=t&x={x}&y={y}&z={z}
    
    Google Terrain Hybrid:
    https://mt1.google.com/vt/lyrs=p&x={x}&y={y}&z={z}
    
    Google Satellite Hybrid:
    https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}
    

iOS Tricks and Solvable Problems

Things that should be simple.

There’s no escape key on my iPad keyboard!!

CMD + . acts very similarly to the escape key on iOS, you can use it to close out of many menus.

If you are using vim through SSH (via Blink, Termius) or vi (on iSH) the command CMD + [ serves the same purpose as the escape key.

Automatically convert and upload workouts from Apple Watch

HealthFit ($3.99) generates nice visualizations and statistics from your workouts. Its automatic synchronization feature is also very slick and can liberate your Apple Watch GPS tracks from the default Fitness app by converting them to the standard .gpx format (.fit is also supported, or both can be exported at once) to a folder in iCloud.

Real world example:

I rely on this workflow for geotagging photos from my DSLR. When I’m out and about I start an “outdoor walk” in the Workout app on my watch, shoot to my heart’s content, and end the workout when I’m done. HealthFit automatically detects the finished workout, converts the GPS track to a .gpx file, and uploads it to iCloud. When I sit down at my Mac to edit photos I can easily import the .gpx file in to Lightroom which matches the photo’s timestamp to the proper location in the .gpx file.

If I just want to glance at a .gpx track I recommend GPXSee.

I have GPX tracks from multiple different applications and I want to standardize the file names

Use the venerable exiftool.

How do I put a DRM-free audio book that I purchased somewhere else in to Apple Books on my iPhone?

Apple Books doesn’t sync custom audio books even if you have Apple Drive enabled.

Solution: AirDrop’ing .mp3s doesn’t work, they go straight in to Music. The share menu on .mp3 or .m4b files in Files doesn’t provide an option to copy add to Books like what happens with .pdf and .epub.

The only option I’ve found is to transfer .m4b files with Waltr2. From here you can use your Apple Watch as an audio book remote BUT you still can’t transfer the book to the watch this way.

There’s a discussion on the MacRumors forum describing a couple different apps you can use to play audiobook files on your Apple Watch including the popular Castro podcast app as well as iCatcher, and MixTape Audio Sync. I can’t speak about any of them, my solution was to import the book in to Apple Music, right click on the album, navigate to the options tab, and select Remember playback position.

I want DRM free audio book files like those I can purchase from Downpour.com but jeez, this process is miserable.

Git on iOS

Working Copy by Anders Borum is your first and last app for working with the contents of Git repositories. There is an official app for GitHub called Github Mobile which allows viewing code in repositories and managing GitHub issues and pull requests but lacks any sort of editing functionality. GitHub Mobile has eclipsed GitHawk, an older, third-party GitHub management app.


List Files in Directory with their Git Create Date

Extending ls to display the date each output file was created in a git repository.

The Command:

ls | xargs -t -I % git log --diff-filter=A -- % 2>&1 | grep "Date\|log"

Sample Output:

Produces a result like

git log --diff-filter=A -- 2018-10-31-sensor-hardware.md
Date:   Wed Oct 31 16:18:12 2018 -0400
git log --diff-filter=A -- 2018-11-05-Railroad-logos.md
Date:   Thu Nov 8 05:51:50 2018 +0000
git log --diff-filter=A -- 2018-11-09-ADSB-Guide.md
Date:   Thu Jan 24 15:00:06 2019 -0500

Breaking it down:

ls

List the files in the current directory

xargs

xargs reads items from the standard input, delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines, and executes the command (default is /bin/echo) one or more times with any initial-arguments followed by items read from standard input. Blank lines on the standard input are ignored.

https://linux.die.net/man/1/xargs

xargs -t -I % git log --diff-filter=A -- % 2>&1
       |                |                   |-> Combine stderr and stdout
       |                |                       Needed because -t prints to stderr
       |                |            
       |                |-> Filter commits based on what happened to the file,
       |                    "A" means only display commits where the file
       |                    was added
       |                        
       |-> Print the command that will be executed to stderr before executing it
           (This is where grep extracts the filename)

diff-filter documentation. Other useful options include C for copied and R for renamed, these options can also be combined!

If we exclude 2>&1 and grep for a moment and just run ls | xargs -t -I % git log --diff-filter=A -- % this is what we see:

git log --diff-filter=A -- 2018-10-31-sensor-hardware.md
commit 1e273670ee661839e813c859007fda2cacb670d9
Author: djbeadle <████████@█████.com>
Date:   Wed Oct 31 16:18:12 2018 -0400

    Temp Sensor Part III
git log --diff-filter=A -- 2018-11-05-Railroad-logos.md
commit e25fb5135645a2f241a1bbea003f71c09126dc8a
Author: djbeadle <████████@█████.com>
Date:   Thu Nov 8 05:51:50 2018 +0000

    Made it a markdown file
git log --diff-filter=A -- 2018-11-09-ADSB-Guide.md
commit 5ece46b85b8b7fed20ccc3b67ced29d7e5aeb0f8
Author: djbeadle <████████@█████.com>
Date:   Thu Jan 24 15:00:06 2019 -0500

    Rename ADSB post, create new post on FlaskWTF and QuillJS

(Email censored by hand to make things a little harder on the bots)

This output is useful, but it’s a little more wordy than what we would like. Also it’s split in to stderr and stdout as follows:

STDERR: git log --diff-filter=A -- 2018-10-31-sensor-hardware.md
STDOUT: commit 1e273670ee661839e813c859007fda2cacb670d9
        Author: djbeadle <████████@█████.com>
        Date:   Wed Oct 31 16:18:12 2018 -0400

            Temp Sensor Part III

We can merge that with 2>&1| and send it to the next step

grep

Nothing fancy going on here, grep "Date\|log" searches for “Date” or “log” and exports lines that contain either of them.

This finally leaves us with the following:

git log --diff-filter=A -- 2018-10-31-sensor-hardware.md
Date:   Wed Oct 31 16:18:12 2018 -0400

Further Processing

We could do something fancy to parse our output in to CSV format, but since I only need to do this for one or two files right now I just copy and paste the output in to Notepad++ and use the super userful macro feature to wrangle the text in to the exact format I need. If you haven’t used Notepad++’s macro feature you’re missing out, find it under the Macro menu!

Implementing this in bash is left as an exercise to the reader. 😉


Opening Signal Desktop Database on MacOS: I’ve seen some conflicting processes out there, here’s what worked for me in May, 2020:

  1. Download and install DB Browser for SQLite but note that YOU MUST download the version specifically built with SQLCipher support. This version is not obviously available on their website, but you can find it in the nightly build folder here

    When I tried to open the database with the default version of DB Browser it asked for a key or passphrase but it was never successful in decrypting the database. (This was what you might call infuriating)

    You can find those builds here: nightlies.sqlitebrowser.org/latest

  2. Open the folder in Finder by pressing Shift + Command ⌘ + g (or open the Window menu and click Go to Folder) and enter the following path:

    /Users/{USERNAME}/Library/Application Support/Signal

  3. Open the file config.json in your favorite text editor and copy the value of key, for if you saw the following you would copy A_VERY_LONG_STRING_OF_LETTERS_AND_NUMBERS without the quotation marks.

    {
      "window": null,
      "key": "A_VERY_LONG_STRING_OF_LETTERS_AND_NUMBERS",
      "mediaPermissions": true
    }
    
  4. Back in Finder open the folder sql

  5. Open the file db.sqlite (by right clicking on the file and pressing open as, dragging the database to the application, etc.) in your newly installed version of DB Browser for SQLite.

  6. Switch the decryption method from passphrase to raw key in the dropdown menu

  7. Ensure that SQLCipher 4 Defaults is checked. SQLCipher 3 Defaults did not work for me.

  8. Type 0x in the password box and then paste the key you copied from config.json.

  • With our previous example you would enter 0xA_VERY_LONG_STRING_OF_LETTERS_AND_NUMBERS
  1. Press OK

You should be in, the rest is up to you!


COVID-19 Signs on Instagram

It turns out that I wasn’t the only one who created an Instagram account for pictures of COVID-19 related signs.

My account is @covid_19_signs_nyc.

Other people have made accounts such as @covid19signslimerick, @duetocovid19, @signs_of_covid, and @signs_ofcovid. There’s even a website aggregating signs from multiple sources at duetocovid19.com.