Notes for May 13-19

This was a moderately intense week work-wise, but I had a few hours in the evenings to continue my tests of RK3588 boards and, of course, fiddle with ’s API.

GPT-4o Impressions

I’m pretty impressed by the sheer speed of the responses, although I must say correctness hasn’t improved that much over GPT-4 (for the kind of stuff I put it through).

But the image analysis portion is pretty good and it works well with Open Web UI, so I get a nice chunk of the Pro experience without having to subscribe and I get to keep my chat history on my NAS.

Other Stuff

I must confess I spent an embarassing amount of time playing with . I mean, one has to unwind somehow, right?

Other than that, it was mostly about trying to trim down my personal backlog. So besides , I ended up fiddling with various electronics and doing a bit more CAD work for one of my projects, printing test slices and poking at measurements.

RP2040 PWM Signal Generator

The nicest hack of the week was probably setting up a RP2040 to act as a PWM signal generator for testing salvaged speakers:

# code.py
from audiopwmio import PWMAudioOut
from audiocore import RawSample
from array import array
from board import GP14
from math import sin, pi
from time import sleep

# Generate one period of a sine wave at 440 Hz
rate = 8000
length = rate // 440
data = array("H", [0] * length)
for i in range(length):
    data[i] = int(sin(pi * 2 * i / length) * (2 ** 15) + 2 ** 15)

pwm = PWMAudioOut(board.GP14)
sample = RawSample(data, sample_rate=rate)

# Short beeps
while True:
    pwm.play(sample, loop=True)
    sleep(1)
    pwm.stop()
    sleep(1)

The RP2040 is a pretty neat little chip and it can do a lot more with audio, but as always, it is the little hacks that are the most satisfying.