Back from vacation

Been a while due to some travelling. Finished reading a few books in the meantime, so I’ll get some notes up.

Looks like I’ll be changing clients soon, so going to punt on the pure software stuff until I know what I’ll be doing. This means focusing back on the hardware and embedded tasks.

With the nicer weather a fair amount of time is also going into a pile of car upgrades (out of scope for this blog) but I’ll try to get at least something a few times a week.

Headfirst C

I had been working through a C++ book, which I just realized I hand’t added here yet. So I’ll do that later… What this is really about, is I am switching over to work though another book, primarily because I have an electronic version of this one, and so don’t have to have the actual book with me.

IN general, I like the headfirst series, even if they tend to be on the simpler side, they are (relatively) fun to read. This one is no exception. I’m a few chapters in and while I’m not really learning anything new, it’s a good enough refresher for basic C since I haven’t’ worked with it in a very long time.

Project Talos

Another project to track on here. This one is a MQTT backed general automation system. The initial application will be the kitchen indoor herb garden. Starting with light, then temps, and probably water as a third option.

Each application area (for example herb garden, aquarium, fermentation chamber) will have it’s own local controller (probably RaspberryPi Zero W). Each module in that system should also have some degree of local autonomy and be able to respond to emergencies without input form the controller.

The house as a whole will also have a MQTT hub which will aggregate the internal MQTT traffic and push data out to a cloud (probably azure, but possibly AWS) based service.

Project Euler Problem #1

I did the first Project Euler problem. Since the goal for an easy one like this was more about getting tool chain issues sorted out I went ahead and did it the brute force O(n) way. I had planned on working out the more efficient solution which should be O(1), but they actually discuss it in the explanation you get after reading it, so now I don’t know if I will or not.

Doing it the more efficient way would still let me play around with pointing a profiler at it or something to actually measure the difference, so maybe I still will. I definitely will for some problems, I just don’t know if I’ll bother with one this simple.

EDIT: Decided to go ahead and do the smarter version. Also found a bug in the brute force version while doing so and fixed it.

EDIT2: Removed link to github (and made repo private) because it is against the rules to reveal solutions.


One of the never ending issues with roguelikes is tiles vs characters (ASCII for example, but many use more extended character sets.

Currently I’m exploring the feasibility of making a graphical tile based interface where the default tiles are SVG defined character graphics. For local play, this should give most of the benefits of both. For online play, there are different issues (ans some additional benefits if I go with a browser based interface), but I’m focusing on local play at this point.

I hope this approach will give me:

  • A system where pretty graphical tiles are possible but where I can quickly define character based ones. For me, character based is preferred, but an SVG tile is an SVG tile whatever it’s contents, so if someone with the desire and talent wished to do so, icons would be inherently supported
  • Scaling. This should allow the “graphical” part of the game to scale more gracefully across a range of screen/windows sizes and resolutions.
  • Templating. I’m just learning to work with SVG, but I hope that I can template-ify the icons so that variations (tin things like color) can be done more easily. This is the equivalent of color coding your orcs (‘o’) in a character based system.

For now, I’m going to work towards using the SVG data directly, but I suspect that for performance reasons some sort of tile generator/smarter caching/whatever will be required.

Since I know next to nothing about working with SVGs, I picked up a few books. No review/recommendation on these as I have not read them yet.

Splitting EOS

As I think some more about this, I want the alarm clock portion to be near the bed, but not the light portion. This means some sort of communication (presumably wireless) between them.

I’m also not sure just how much light I’ll need to pull this off and/or how to diffuse it effectively. Also, colors?

With this in mind, I think step one is going to be to kludge together an LED setup to get a feel for brightness controls. I’m concerned by how dim I can usefully go using PWM so may need to look into a more involved current source rather than just using the PWM off of a micro to trigger a transistor (I’m assuming I’ll need more current than the micro pin can source/sink)

With that in mind:

Step One: Figure how much light I’ll need, if I want colors (possibly starting more red), and how to diffuse the light.

Step Two: Get the fading process worked out, but just triggered by a local button.

Step Three: Clock Stuff

Step Four: Wireless communication. I may go with something that includes wireless from the start (I’ve already been kicking around the idea of an MQTT hub for the house, could just use actual wifi and tie into it, but I’d also like to learn to do some more direct radio comms)

Project Eos

Project Eos1 is an alarm clock project that will include a progressive dawn like lighting element. 

Initially it will be either Arduino or maybe even Raspberry Pi powered. This is total overkill, but I want to play with a few different display/input options, and the iteration speed will be faster this way. Once the prototype provides enough information for the final version, it will probably be moved to a single PCB option with a microcontroller. 

As a list for myself, version one will need:

  • A processor of some sort. An Arduino or Raspberry Pi for now
  • A way to tell the time reasonably accurately
    • Either a real time clock module of some sort, or an internet service. I could track time other ways later, but this gets me going without worrying too much about the precision of my timekeeping. 
  • LED(s) + driver circuitry + diffuser(s) etc.
  • A way to display the time. I would prefer this to not be on by default unless *very* dim. But if not on all the time need a sufficiently simple way to temporarily turn it on and probably have it stay on on a schedule.
  • A way to generate an appropriate sound
  • Buttons/switches to set times/alarms/snooze/etc
  • Software

I know there are plenty of these out there, but the timekeeping and lighting aspects tie into another project that is already underway. 

The other side of technical books

As a rule, I am usually reading at least one technical book for my own purposes. At the moment, this is being taken over by one for work. As part of some tasks at work, I am reading a new book. The material isn’t bad, but the prose itself is painful:

Deeply inspired to the classic client/server request model, the WebForms model worked beautifully and…

Page 4

I skimmed the book first just to see what it covered and it seemed OK. As I go back through in more detail it’s clear that this is going to be a slog. Not because of the underlying material, but because the phrasing is so baroque. 

I have included the by now traditional link if you want a copy of your own. But I recommend staying away unless the material is particularly critical for you. 


I’m going to play around and go through the NAND 2 Tetris course. Well maybe. I have the book,, so I don’t know if I’ll do the Courseara courses, just go though the book, or what.  I’ll Probably start with just the book, and do Coursera if it seems like it will help. 

This is a tough one to categorize. But since the early parts of the book use  an HDL (not sure yet if they use a “standard” one, or if they have rolled their own simpler one for the course) it seems close enough to hardware to count. A case could probably be made for embedded as well, but it seems more of a stretch.

I don’t think the book is necessary, but if anyone else is interested, here it is:

Building KiCAD

In addition to personal projects, I’d like to contribute to some larger efforts. And if doing so, might as well contribute to something I use. This makes KiCAD an obvious possibility since I’ll likely be using it as my EDA tool while working on hardware.

KiCAD is not a simple piece of software, so I may revisit this. But step one is going to be to 1) Get this to build in windows or 2) Setup a Linux environment (probably virtual) and built it there instead. Just getting it to build looks like it’ll take some effort, but I have been wanting to dive into more modern C++ for a while.

Even if I end up not contributing, looking into the details of the KiCAD codebase will probably be interesting. 

Art of Electronics (3rd)

Kicking off a new book to work through.

I remember going through the second edition and running into lots of questions/things I wanted to explore further. So why not work through the 3rd edition? If you’re feeling particularly brave, a link to get your own copy is below. 

I’ll probably do the lab book as well once I clear some space on a bench.

Restarting YARG

A while back, I was kicking around a few roguelike game ideas. YARG 2 is a relaunch.

I haven’t worked in Java in a while, so that will be the language for now. Once I get underway a bit farther I’ll get code repositories and Project management up and shared. 

The first phase is going to be working out the display system. I’m currently thinking of using SVG based tiles. This will allow me to create alphanumeric tiles programmatically, but also allow for future expansion into other tiles.  The downside is that even the “ASCII” tiles won’t play too nicely with terminal based play. I’ll try to leave the GUI abstract enough that a terminal replacement is at least possible (even if I don’t make it myself).

Working on the visual interface will give me time to decide which of the roguelike ideas I want to pursue.. Plus I can try to package it up as an independent library.

Software Introduction

This category contains assorted software projects and topics.

I try to work on personal projects that aren’t too closely related to work. This is mainly to help keep me interested, but also helps with any IP issues. 

I will be putting code up somewhere (probably github) as the actual projects get underway and hope to get some of the project management/task tracking organized and made public as well. 

Hardware Introduction

This category contains assorted hardware projects, inclusive of the hardware portions embedded ones.

I plan to setup some git (github?) repositories for sharing schematics/layouts etc. Git isn’t really a great tool for it though, so I’ll be keeping my eye out for a better solution. 

I am not a hardware person by any stretch, so exploring in this direction should be fun. 

Books Introduction

Welcome to the Books section of Sparking Squirrel.

Books are important to me. In technical endeavors, I generally find myself using them to build knowledge from the bottom up (vs top down like projects tend to promote).

My pal is to use this section to track progress through various books that I am working my way through, and probably write some book reviews along the way as well. 

Obviously, this category will overlap with the others depending on the subject matter involved. I’m not yet certain that separating them out into a distinct category is worthwhile, but I figured I’d give it a shot. Each book should also have it’s own tag, so that might be sufficient. Time will tell. 

As an Amazon Associate I earn from qualifying purchases. I don’t really intend for this to make money, but if I’m going to be linking to Amazon for books I’m discussing anyhow…