open-source projects and internet rabbit holes.

AI Is still kind of cool, actually

Given the mass swarm of hate towards AI, I figured I’d share a win about how I’m using it in my hobby time for silly little projects and learning.

My current hobby goals include learning more about the physical realm of computing. I’m a big believer in maintaining curiosity, and by the powers that be there is Plenty To Learn About. Between my RTL-SDR kit and this Inland board- we’ve got something to chew on already. I haven’t had a clear “driver” though beyond capturing my car key’s transmission or making an LED blink, so this was a fun surprise from our AI friend. Being able to speak native-language, be curious, instead of trying to grok through a book as thick as The Art of Electronics just fits me a little better as a learner.

Of this new-age experience, two things have felt extremely enlightening to me.

The first is using these tools more socratically. With the release of Fable1, I decided to try it out by busting out my old Inland-brand Arduino Nano knockoff.

Of course I did the “make the LED blink” project, which is just a few lines in the sketch. Set up the pin, write high, delay, write low. Easy-peezy.

Fable then threw me for a loop:

Coach challenge, since blink-via-API will take you four minutes: rewrite it with no Arduino calls at all. Hints, not answers:

#include <avr/io.h> gives you DDRB/PORTB as macros. Setting and clearing bit 5 is bit-twiddling you can do in your sleep.

There’s an XOR trick that makes the loop body a single line.

For the delay, _delay_ms() from <util/delay.h> works — but here’s the interesting question to sit with: what is a software delay loop actually doing, and why does it need to know F_CPU (16 MHz on the Nano) at compile time?

And I thought… oh! This is neat! Heck yeah let’s give it a go!

I then found myself looking at the actual header files that make up the Arduino API, and with a little more prodding and googling, I managed to get a working solution (after some embarrassing bugs I refuse to share with the world):

#include <avr/io.h>

void setup() {
   DDRB |= B00100000;
}

void loop() {
  PORTB = PORTB ^ B00100000;
  _delay_ms(500.0);
}

ITS ALIVE!

My point being with this little post:

I’ve already had some revelations in dusting off the old Calculus II and Calculus Physics cogs in my brain as well when it comes to things like signals as well. Thank you 3Blue1Brown!

Very much looking forward to the journey ahead, and some cool projects on the horizon!

  1. https://www.anthropic.com/claude/fable