Monthly Log 2024

2024-02-01  (Updated 2024-06-30)    13 minute read

01 - January

tlature

Did some refactoring around Commands so that I could:

  • Map commands like :wq to multiple edits
  • Make App-level commands, like :? to open the help dialog
  • Add tooltips to subcommands like :add, which are not commands in themselves, but rather components of other commands like :add plugin or :add block

Bevy Replicon

Did a cursory evaluation of a bunch of bevy networking crates. Decided to use Replicon for my current game, and wrote about the process of integrating it:

🌐 Bevy netcode - Exploring various online multiplayer solutions for the Bevy game engine
Replicon

02 - February

tlature

I probably should've been taking notes on what I'm working on while I was working on it, but in lieu of a more thorough description, here's a summary of my git log:

  • Add better RouteView and PluginView panels, including parameter editing
  • Add chain view scrolling: Instead of squeezing every processor on the page, chain view panels now have a fixed width, and the ones that don't fit aren't shown until the selection moves offscreen.
  • Add base64-encoded plugin state for non-UTF-8 plugin state bytestreams

FediCard

Nash and hexephre from labyrinth.social made a little tool for creating FediCards! It's built using Godot, which is really neat, but in the comments, there seem to be a few issues when running on some browsers and OSes.

To that end, I've been playing around a lot with web technologies, and in particular, HTML and SVG. In my naïveté, I figured I'd be able to whip up a quick browser-based editor to provide a more compatible (albeit less functional) companion application. Check out the proof-of-concept here

See also:

Monthly Log 2023 - Designing a card game?

Problem 1

My first instinct was to make an SVG file that gets edited, and directly export that. After hand-minimizing an SVG file and defining all of its style in CSS, I ran into issues with HTML <input> tags embedded in the SVG data.

In retrospect, I could've probably rigged up some sort of Javascript shenanigan, but at the time, I was hoping to get away with as little Javascript as possible. So I converted all of the SVG rectangles to <div> tags.

Problem 2

There's no way to resize the <textarea> dynamically based on its contents with just HTML. My solution to this problem was to ignore it.

Problem 3

After adding some controls for zooming into the image, I ran into an issue where the zooming was causing the image to exceed the bounds.

I turned the img tag into a <div> because I have no idea what I'm doing and the internet told me that would work. And it did.

Rowing machine mod

A while back, I found a used rowing machine on craigslist. It was in really good condition (still had the plastic screen protector, and clearly hadn't been used that much). I've been using it pretty regularly, and for the most part, I'm happy with it, but there's one issue that's been bugging me: after ~3 minutes of inactivity, the screen resets, and does so with almost no warning.

Obviously, the only solution is to reverse engineer the device so that I can build my own distance tracking device. And because the original head unit is mounted to the machine using a VESA mount, this has the added benefit of letting me mount a screen and speakers instead, so I can more comfortably watch stuff while I exercise.

Finding pinout

First step was to figure out what all the pins did. I took apart the head unit, and looked at the board to figure out what did what.

Then I probed the pins to check for voltages and any discernable signals. Under the assumption that the black wire was ground, I found pins with 9 volt and 3.3 volt signals, which I just assumed were power, but other than that, the only other pins I could identify from the 10 total pins were a pair of differential signals.

Next step was to open up the body of the machine. In retrospect, I shouldn't have wasted any time with the head unit, because everything I needed to know was in here. There is a small cylindrical sensor pointing to the air resistance wheel, and after following its wires back to the cable harness, I probed it to find that its resistance dropped when it got close to a magnet mounted on the air resistance wheel. With this, I could just treat it like a pull-up switch and use it to count revolutions.

Building on a perfboard

These days, it's really easy and cheap to get a custom PCB made. With excellent FOSS tools like [KiCad], there are very few excuses to not make a PCB. My excuse in this case was that I wanted to get this running within a few days.

TODO:

  • add pics
  • adding power switch after building the board
  • alternate mcu pins
  • reverse mount headers
  • embassy i/o interrupts
  • 48 revolutions with interleaved i2c
  • 210 when doing one every 10 buttons (maybe because of debouncing or noise? should try with hysteresis)

Next step is to get some sort of speed detection going, but in it's current state, it does everything I need it to, so I suspect that I won't get around to doing anything like that for a while.

Monthly Log

I don't want to complain too much because the fact that I've been able to do 6 months (wow!) of monthly logs without missing any by more than a day or two has far exceeded the expectations I had when I started, but I think I still haven't quite found a good "voice" for blogging yet. Plus, my posts are a bit slapdash and dry, and tend to just say "I did this, then I did this, so I had to do this", rather than outlining any actually useful perspectives or processes, or building an interesting narrative. I had also hoped to use these logs as an opportunity to practice my German, but I've yet to translate any of them yet. Maybe next month.

03 - March

more bevy replicon stuff

Tried a few libraries for rollback/snapshot netcode:

  • bevy_timewarp
    • no examples, documentation is pretty rough
  • bevy_replicon_snap
    • seems very immature, got a lot of weird behavior at high latencies. (Tangentially, tc qdisc add dev lo root netem delay 200ms is a fun command)

Overall, I spent way too much time spinning my wheels and have very little to show for it. I spent the last day of the month basically undoing most of my changes to revert it back to being a local-multiplayer game. I'm also trying to refactor it to make more sense, but seeing how I have very little experience, it's pretty tough. I think I might just start from scratch on a simpler game, with more focus on game mechanics and playability rather than spending so much time on high-complexity features like scriptable abilities and multiplayer. Maybe even enter a game jam or something.

blender mod

  • bought a $30 blender on craigslist because i was tired of holding down the cup on my smaller personal ninja blender
  • fool that I am, this one you have to hold down the button, so I still can't walk away from it while blending
  • so i soldered a toggle switch on it in parallel with the momentary switch
  • fortunately, it was easier to take apart than my old smaller blender
  • i once again forgot to take pics
  • super easy modification that i think anyone can do to almost any blender

04 - April

Mostly game development this month:

🧙 Spell Scripting - Creating a state machine scripting language to implement spells for a MOBA
⭕ Circle physics - A physics engine specifically for real-time strategy games

But also a bit of ↹lature:

↹lature - devlog - Implementing a niri-like signal chain viewer

Monthly log

It is the 27th of May, and I am just now uploading my log entries for April. I originally intended to write and post my logs while I was travelling at the beginning of May, but that just didn't happen at all. On the bright side, I spent basically the whole day yesterday revamping and reorganizing the wiki, hopefully in a way that makes it easier to write for. I'm also really proud of the two articles that I did end up with, and think that they're some of my best.

05 - May

Went to Montréal for Open Hardware Summit.

  • Additional wiki features:
  • Wrote two small tools for using my HP ZBook X2 G4:
    • flourish, a touchscreen gesture launcher. Currently needs to be run as root, which makes it almost useless because then it can't launch things or modify niri.
    • hp-quick-keys, a launcher than listens to the "quick keys" on the ZBook, which are exposed as a USB Human Interface Device. This works much better since it doesn't require root. TODO: talk about the different gestures and how they're measured
  • Added magnetic feet to my keyboard (TODO: pics)
  • I've been "falling behind" on my self-imposed monthly "schedule", which I think means I should be making smaller posts and updating them more often

06 - June

Documented an old project (mostly taking pictures):

❤️ Life Counter - Device for keeping track of an integer value in a tabletop game
  • research screenless computer
  • research persistence of vision vibration sculpture
  • start programming esp32s (again)
  • inline latch for cardboard boxes (downloadable 3D print to be added)
  • tlature transport refactor
  • planned out a more elaborate bed desk with overhead rails
  • increased the font size on my rowing machine display

07 - July

  • Got DAC output working on a Raspberry Pi Zero for screenless computer
  • Fixed my rowing machine: the strap broke, so I replaced it with some cheap webbing I got off Aliexpress, which also broke. Bought a nicer nylon webbing (also from Aliexpress), and that worked a lot better.
  • Made a Gaussian curvature visualization script for Blender. My plan is to eventually adapt this into a plugin that flattens faces to make them zero curvature for papercraft and acrylic bending purposes.
  • wifi-button: made a PCB and played around with MDNS on the ESP32
  • Made a swatch to see how different layers interact on a PCB to use it in PCB art
  • Started working on a TUI extension for the CLAP plugin format

08 - August

Swatch PCBs came in, turns out they decide whether to remove silkscreen from areas with no mask on a case-by-case basis.

🟩️ PCB swatch - Color and pattern test for PCB art

  • Life counter
    • Touched up the PCB last month, and tested the new boards this month after they came in.
    • Turns out the STM32 has about a megaohm between its GPIO pins and ground, which messes with the enable input of the load switch im using. I wanted the buttons to pull down and have the load switch input low enable, but it seems like that would require a bunch more diodes.
    • Cleaned up the art file, will make a script that turns the cleaned-up version into a set of KiCad files.
    • Made an inkscape extension that I intended to use for this, but I ended up using the GIMP newspaper filter and tracing the bitmap instead. Looks very comic-y.
    • (TODO: elaborate, clarify, document in life counter article)
  • Wifi button
    • Assembled, doesn't work very reliably, partially because of the wifi antenna.
    • LED driver was a bit of a pain; using the same one in the life counter
  • Someone sent me some contributions to tui-nodes! Didn't expect it, and the changes were well done and much needed, so it was a very pleasant surprise. It was also my first time using git-am, which was very enlightening. I now realize that I need to migrate to meli as soon as possible. But also, the mail service I'm currently using doesn't seem to let me send emails from my domain (though receiving seems to work fine, so git-am should work fine for now as long as I don't need to request changes).
  • Made a single DDR pad. TODO: write an article about it sometime this month. Will be tough because I neglected to take pictures.
  • Screenless computer
    • Couldn't get the hifi DAC that I was using on my Raspberry Pi Zero to work on my Orange Pi Zero 2W.
    • Gonna work on the software side for now while that simmers. Made a quick mockup with speech-dispatcher and jack. Next step is to playback samples (probably wanna load them into memory first, for the alphabet).
  • PoE
    • Got a 5V output using a dedicated PoE ethernet jack and a Silvertel-esque module.
    • Have been working with PoE injectors, which it turns out aren't actually compliant because they inject voltage regardless of whether the device requests it. Ordered a cheap PoE switch for testing.
    • Also want to try out dual rail generation (i.e. both positive and negative voltage), so I ordered a transformer for that. I have no idea if it's going to work.
    • Messed around with inductors
    • TODO: write article
  • Tried to test some coils for reverse-engineering Wacom EMR pens, but it didn't work. Ordered a headless oscilliscope that should make things a bit more convenient. TODO: write article, or at least a linkdump

09 - September

  • wrote an article for how graph drawing works in tui-nodes to try to make things easier for contributors who want to improve that part TODO: link
    • made a little program for drawing in a tui, but used a svg output instead for better compatibility TODO link
  • Added modifier and release keybinds to niri. currently testing it to make sure it's working right before upstreaming, and I've already run into a few issues.
  • building a dead bug circuit for PoE
  • flashed a ch32 riscv chip, excited to try out ethernet on it

10 - October

  • https://adventures-with-pi.blogspot.com/2024/10/setting-up-author-attribution-for.html