Posts

Keyboard Maestro macro to toggle macOS calendar visibility

As a pianist, I use Calendar on macOS and iOS to plan each day’s practice. On heavy days I may have over a dozen practice blocks, so the calendar gets crowded quickly and it becomes easy to miss non-practice events. A calendar that looks like this makes the problem obvious:

What I really wanted was a quick way to toggle a group of calendars at once on macOS. In my case, that group is the set of works I am currently practicing (for example, specific Brahms and Schubert calendars). Your grouping might be completely different, depending on your purpose, but the same approach applies.

A script to generate KiCad board outlines

PCB fabricators require a board outline on the `Edge.Cuts` layer to specify the board size and shape. While drawing the board outline in the PCB editor is straightforward and uses the standard line and shape drawing tools, it is convenient to retain standardized board outlines and related parts, such as fasteners, as reusable footprints. During the board layout process, you can simply plop a board outline, along with perfectly-placed mounting holes into the editor and you can concentrate on placing components and routing. Also, having a standard library of board outlines gives you a predictable set of size choices for enclosures and for ordering SMD stencils.

This is why I created KiCadBoardOutlineGenerator, a script to generate board outlines from dimensions you specify.

Indigo actions are not guaranteed to execute sequentially

Although I’ve used Indigo — the macOS home automation ecosystem — for over a decade, I never picked up on the fact that Actions attached to Schedules, Triggers, and web UI elements are not executed sequentially. The application user interface strongly implies sequential execution, but not only is that not guaranteed, the app actually attempts to execute the actions in parallel.

See this note buried in the documentation:

Important! While you can order the actions in any order you like, Indigo will attempt to execute all actions in parallel. It’s not always possible for various reasons, but that’s the intent. If you want to order the execution, then you’ll need to add delays which will delay the action’s execution from the time of the event. So, if you have 3 actions and you want the first to execute immediately, the second to execute a minute after the event, and the third to execute two minutes after the event, then add a one minute delay to the second and a two minute delay after the third.

GPIO initialization on the ESP32 in ESP-IDF

This is just a quick post on how not to initialize a GPIO in ESP-IDF. A tutorial on Embedded Explorer discusses GPIO use in ESP-IDF and suggests initialization in this way:

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"

#define LED_PIN     GPIO_NUM_32
#define BUTTON_PIN  GPIO_NUM_36

void app_main(void)
{
   gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);   
   gpio_set_direction(BUTTON_PIN, GPIO_MODE_INPUT);
   
   while(1) {       
      if (gpio_get_level(BUTTON_PIN) == 0) {  // If button is pressed
         gpio_set_level(LED_PIN, 1);         // Turn the LED on
      } else {
         gpio_set_level(LED_PIN, 0);         // Turn the LED off
      }
      
      vTaskDelay(1); // Add 1 tick delay (10 ms) so that current task does not starve idle task and trigger watchdog timer
   }
}

This of course works, but I wanted to clear up matters because I think this takes some major shortcuts. Here is what I would suggest instead:

Use of this site is restricted - no Trump supporters, please

Pinned post
I offer this site as a resource and a safe haven for people who have similar interests to mine, and I make no income off this site. I don’t do affiliate links. No paywalls. There are no stupid subscription pop-ups. Just my space to write. It’s a labour of love. But a side effect is that I don’t owe anyone anything. This is particularly true of supporters of Donald Trump. If you voted for Trump, or support Trump, or regularly vote for members of the party formerly known as the U.S. Republican party, but which is now a fascist political enterprise, please just click the back button.

Removing Stuck Filament from the Bambu AMS 2

3dp

The Bambu AMS 2 Automatic Material System is a peripheral unit that provides multi-filament selection and feed management for several Bambu Lab FDM printers. I use it with a P2S printer and have generally been satisfied with its operation. However, as with any printer, filament breakage does occur. Because filament in the AMS 2 is routed through a complex network of PTFE tubes, drive gears, and internal manifolds, removing broken fragments can be substantially more difficult than on single-extruder systems.

Scripting Shelly relay devices in Indigo

This is a proof-of-concept for scripting Shelly relay devices in an Indigo Python action.

I’ve used the Indigo macOS home automation software for many years. It’s a deep, extensible and reliable piece of software. Among the extensible features of the application is its suite of community-supported plugins. There is a plugin for Shelly devices, but it supports only earlier devices and not the current units. As I understand it, the author does not intend to update the plugin. In this post, I’ll show a method for controlling these devices without plugins. The shortcoming here is that the Shelly device doesn’t have a corresponding Indigo device, and everything is handled through action groups and variables.

Some thoughts on the Charlie Kirk Assassination

Until this month, I’m not sure I had heard of Charlie Kirk. Now the entire world has.

First of all, to any MAGA people reading this: No one on the progressive side wanted to see this man dead. That actions of the alleged murderer were his alone and don’t represent the views of practically anyone on the Left. So stop pretending otherwise. You’re not helping. The gunman’s motives are poorly understood and much more evidence must be collected in order to understand his political ideology. I’m not even sure he has a coherent philosophy. So attempts to reduce this to some vast left-wing political conspiracy is a ridiculous cognitive shortcut.

Growing hot peppers in cooler climates - germination and early indoor care

rxmslp

Growing Capsicum sp. in general is a challenge in cooler climates because these are all relatively long growing season plants. Hot peppers, particularly certain varieties, present an especially complicated challenge because their growing season greatly exceeds the number of suitable days available. I live in Ontario, Canada, and without many weeks of indoor preparation, growing my beloved hot peppers would be impossible. Instead, with some planning and preparation, we can grow exotic varieties like the RXM SLP shown in this post.