Companion Robots and Maker Faire Season!

I’m super excited for Maker Faire Bay Area / Mare Island and Mini Maker Faire Rocklin.1  I’m not just excited to see everything, but to show all the things I’ve been working on for a while now.  It’s also time to pick up all the little dev boards I’ve somehow accumulated and see if I can make anything with them to show off.

  1. Project Boards
    1. Wemos D1 Mini.  A small insanely cheap (~$3?!) WiFi enabled dev board2 , which has 4MB onboard and can run Arduino.  I think it can also run MicroPython, but I haven’t tested this yet.
    2. Wemos 600 Pico.  An even smaller, even cheaper (~$2 when ordered from China) WiFi enabled dev board that runs… MicroPython?  I think??  I’m saying “I think” because I haven’t been able to get it to do anything yet.
      1. Since starting this blog post, I found a guide on installing MicroPython on Wemos boards that seems promising.
        1. Flashing MicroPython on an ESP8266
        2. https://github.com/espressif/esptool/tree/master
        3. Arguing with Python to let me use “esptool.py”
          1. esptool -p COM13 -c esp8266 flash_id
      2. As promising as that series of blog posts looked, I eventually scrapped the Wemos because it was just too much of a pain to get going with MicroPython.  I think I could have made it work, but for $7 I could also just use the Adafruit QtPy I already have.  The advantages of simply uploading code over a USB cable into a virtual drive just can’t be overstated.
    3. Other Boards
      1. I have a bad habit of picking up dev boards.  I’ve got several Adafruit QtPy’s, several Adafruit Trinkets, an Adafruit FX Sound Board, Raspberry Pi Pico (non-WiFi), various Digispark boards, a small handful of ATTiny85’s, and an even weirder assortment of VERY small programmable circuit boards (ISD1806B-COB) designed to go in greeting cards (just 6 seconds), etc.
  2. Companion Robot
    1. Background.
      1. I started this post at least a month ago when I only had a vague idea of what I wanted to make and even fewer skills.  After seeing my kid’s companion robot take shape, I wanted to get in on the action and make my own.  I decided to make a really small companion robot with just some LED’s, piezo, and small microcontroller unit.  I’d taken a stab at making a companion robot a few years ago, but set it aside for a variety of reasons and never went back.
      2. The idea for this new robot would be something a little less ambitious, make more use of NeoPixels than in prior projects3, with a little more interactivity, trying out some CircuitPython, and… let’s be real… more pizzazz!
    2. Idea:  Friendly Cloud/Vapor/Flame
      1. I still really like the copper-toned PLA I’ve been using since it has something of a steampunk flair to it.  I settled on repurposing a small plastic enclosure with a clear dome as the “body” for the robot.  I wanted it to look something like a small entrapped / captive / domesticated4 sentient cloud of vapor or perhaps flame held within a steampunk enclosure.
      2. As a very small, inexpensive board that could run either Arduino or CircuitPython, I decided on the Adafruit QtPy M0.  It could run NeoPixels, there were lots of cool guides on it, plenty of pinouts, and could definitely fit within the confines of my enclosure.
    3. Enclosure:
      1. I started the enclosure by trying to design and 3D print a part to mate with the clear plastic dome.  It took a few tries.

        This slideshow requires JavaScript.

      2. Once I had that, I extended the base so it could hold more electronics.  I could definitely have shoehorned everything into the dome, especially if I took up some of the space inside the dome, but even with an “elevated base” it was still plenty small and could use a battery pack rather than a rechargeable lipo.
      3. Once I had a good design for the enclosure, I tried to make it work with an existing 3xAAA battery pack.  In the process I yanked off the connector and ended up soldering the battery pack leads directly into the circuits.
    4. Internal Electronics
      1. I’m just not a great electrical engineer and am still copy/pasting from various guides, tinkering, changing bits of code, swapping out parts, and using “close enough” resistors.  Wiring up some LEDs or a piezo to a project isn’t very difficult – it’s some of the more fiddly bits.
      2. Piezo Element Speaker
        1. I wanted to use a piezo buzzer/speaker because they’re large and incredibly thin.  They’re not without their downsides.  The crystal wafer is also thin and a little fragile.  The piezo buzzer without additional electronics has the potential to act as a knock sensor and can generate a high voltage spike which can fry a board.  And, without additional electronics, the piezo just isn’t very loud.  There are some libraries for the Arduino that basically double the volume of a piezo by connecting it to two pins and then running each opposite of the other, doubling the voltage difference, but they only work for Arduino chips.5
        2. After searching for various ways to increase the sound of the piezo elements, I settled on trying to use the Adafruit piezo amp.  I bought two – and tried desoldering the terminal blocks.  This completely ruined one.  The other one worked great, but for the modest volume gain it was just too big in an already cramped enclosure.
        3. After searching around, I found some amplifier circuits using a small number of common parts.6
        4. Then I tried building an amplifier circuit using an NPN transistor.  After reviewing the datasheets for my NPN transistors (and PNP transistors), and breadboarding the circuit with resistors, I sketched it a few times, laid it down with copper tape, soldered it in place with SMD resistors, then pulled it off and placed it onto a piece of Kapton tape and put another piece on top – “laminating” it in place.
      3. Capacitive Touch
        1. Buttons are great and all, but with a capacitive touch pad, I could add metallic elements to my robot rather than a much bulkier button.  I bought a few brass upholstery tacks because they looked great – but they just would not accept molten solder.  I ended up cutting the prongs short with wire cutters, wrapping the stub with copper tape, then soldering the wires to the tape.  I’d also added a little piece of heat shrink tubing over the connection to help keep it together.  It’s been working well so far.
      4. LED Animations
        1. As we know from Phillip Burgess‘ incredible “power sipping NeoPixel” guide, we can conserve power and increase the impact of the LED’s by reducing the number of LED’s, keeping max brightness ~20% for a disproportionately large impact, running fewer LED’s at a time, and even running fewer colors at a time.  Between Phillip’s work, Todbot’s guide, and the specialized QtPy NeoPixel guide by Kattni Rembor, I was able to put together a few neat animations.
      5. Piezo Sounds
        1. I had a heck of time getting the piezo buzzer to do anything interesting.  Fortunately, with my kid helped convert the piano music for “Paint It Black” into tones for me.  I haven’t gotten all the note timings right, but I’m working on it!
  3. Future Modifications
    1. More Accessible Enclosure.  Right now the “lid” with a hole for the LED ring just sits on the enclosure with a light friction fit.  One idea is a hinged lid, either with a conventional hinge or perhaps a hidden swivel hinge.  The problem with that, of course, is it requires even more internal space.  Other ideas include a ring on top that screws down, holding the top down and in place.  I’m crap at designing screw threads, so I’ve avoided this.

      Hinged lid for enclosure

      Hinged lid for enclosure

    2. Piezo Knocks.  Perhaps the next version will include some kind of tap / double tap / knock sensors using one or more piezo elements.
    3. Knobs.  There’s not a ton of room inside the enclosure, but by including a gear within a gear, I might be able to rotate part of the case and have it manipulate a potentiometer.

      Offset gear within gear, manipulating an off-center internal potentiometer

      Offset gear within gear, manipulating an off-center internal potentiometer

    4. Motors.  A robot that just flashes lights and makes a few beeps can still be pretty interesting.  However, I have some neat potential features that could be added with just one or two motors.  There are some interesting limitations with the current incarnation of this robot and using a QtPy.  I’ve only got 10 pinouts7 , 1 for NeoPixels, 1 for the piezo, 6 in use for the capacitive touch sensors, leaving 2 for other potential tasks.8  However, space is already tight so one or two micro servos would be a big space commitment.  I’ve seen some really tiny micro servos that might work, but I have no idea where to source them.  One silly idea is a “weapons system” using a spring loaded projectile activated by a very small servo.

      A small spring loaded projectile launcher, actuated by a small servo

      A small spring loaded projectile launcher, actuated by a small servo

    5. Creating Tone Library.  The basic piezo tones are easy enough to play, but including the entire list of tones and the frequencies associated with them seems eat up the poor little QtPy’s memory.  I think compressing them into a library might be the way around this issue.
    6. Playing WAV files.  WAV files are bulky, but that’s the only sound file format a QtPy M0 can play.  However, with the extra 2MB from the SPI chip installed, this shouldn’t be a huge problem.  I used Audacity to mix the sound clip down to mono then to 22 KHz sample rate.  My preliminary tests worked – but it was incredibly quiet.  I haven’t run it through the audio amplifier yet, but I’m planning to.
    7. Sleep / Deep Sleep.  Ever since I swapped out the tiny LiPo for a 3xAAA battery pack, I’ve had a lot more battery life, so adding sleep / deep sleep functions haven’t been a priority.  However, this inclusion just couldn’t hurt.
  4. Other QtPy and CircuitPython Resources
    1. Adafruit’s QtPy CircuitPython PWM resource
    2. TodBot’s CircuitPython tricks
Companion Robots: Building Robot Friends
  1. Cephalopod Robot Friend, the story so far
  2. Cephalopod Robot Friend Progress
  3. CuttleBot Body and OpenSCAD Design Tips
  4. An Assembled CuttleBot Body
  5. Building the Monocle Top Hat Cat for #MicrobitVirtualConcert
  6. Companion Robots and Maker Faire Season!
  1. I just got a notice they’re no longer a “Mini”! []
  2. pinouts for my future reference []
  3. LED goggles and a Marvel Universe inspired set of “Infinity Knuckles” []
  4. OMG dome-sticated?! []
  5. This is just my very basic understanding of how it works.  I’m entirely positive this is far too simplified. []
  6. And one very long article about using a lot of parts []
  7. 12 if you want to count the onboard NeoPixel []
  8. Or 4… []

Coding with an LLM Sidekick

I fell down a rabbit hole recently which lead me to think about my experiences in the nascent field of “prompt engineering.”12

As a thought experiment, I was thinking about what I’ve managed to accomplish working with an LLM, the challenges along the way, and perhaps even where I can see the frayed edges of its current limitations.

After several starts and stops trying to hire someone to assist with a website I own, I turned to the idea of getting help from an LLM. 3 4  After all, some of them were touted as being able to actually draft code, right?  Besides, if the first step in even hiring a developer is just being able to describe what you need, and the first step of getting an LLM to generate some code is defining what I need, then…

There's no way this is going to work, right?

There’s no way this is going to work, right?

  1. 1. Task 1:  Pie Chart WordPress Plugin

    1. I started off with a simple and easy to define task.  My original plugin was a quick and dirty bit of code, so if ChatGPT could create a WordPress plugin, there was a chance it could do something simple like this.
    2. My first attempt was a wildly spectacular, but highly educational, failure.  A brief description of the plugin’s function was enough to get a WordPress plugin template file with very little functionality.  Then came the arduous LLM wrangling, my asking it for refinements, it losing track of the conversation, and the endless sincere heartfelt apologies from ChatGPT about forgetting really basic pieces of information along the way.  Some changes were minor, but changing the names of variables, functions, the plugin, switching API’s, forgetting requirements, etc.  It was constant whack-a-mole that spanned nearly 90 pages of text.
    3. My next attempt was more focused.  I created a framework for discussions, provided more context, goals, descriptions of workflow, and resources for examples.  The result was a lot better, with portions of largely functional code.  However, the LLM kept forgetting things, renaming variables, files, directories, etc.
    4. Next I created the directory structure and blank placeholder files, zipped these, and uploaded them as an attachment for the LLM to review – along with a description of the contents and the above additional context.  This was even better than before, but after a certain depth of conversation no amount of reminding could bring the LLM around to the core of the conversation.
    5. My thinking was that after a certain level of conversation, the LLM was not going to be able to synthesize all of nuance of our conversations plus the content of the code drafted.  To get around this I would begin a conversation, make a little progress, then ask it to summarize the project, the current status, and a plan for completion – which was fed into an entirely new conversation.  This way, Conversation N was able to provide a succinct and complete description which Conversation N+1 could use as a jumping off point.  My thinking was that the LLM would be best positioned to create a summary that would be useful to another LLM.
    6. This process of minor “restarts” in the conversation was one of the most successful and powerful techniques I’ve employed to combat LLM hallucinations and forgetfulness.
  2. 2. Task 2:  Blog Post Series Plugin

    1. After rewriting the above pie chart plugin using an LLM, I turned my attention to a slightly more complicated plugin.  The pie chart plugin is really just a single file which turns a shortcode with a little bit of data into a nice looking pie chart.  There’s no options page, no cross post interaction, database queries or anything.  It was really just a test to see if an LLM could really draft a basic piece of working code.
    2. The series plugin is still a reasonably simple piece of code, but it has several additional feature which require a settings page, saving settings, custom database queries, and organizing information across multiple pages.  It’s also one of the most used plugins on this website.
    3. I figured I would try feeding the LLM a description of my plugin, all the code in a directory structure, and then my initial “base” prompt which explains our roles, needs, resources, and scaffolding for a discussion.  I asked the LLM to summarize the function and features of the plugin, which it did quite nicely.  I added a few additional features I had previously worked on and asked it to incorporate this into the description.  Asking the LLM to simply “build this WordPress plugin” was met with a “you need to hire a developer” recommendation.  However, asking it to propose a workflow for building a plugin with these features was successful.  I was provided with a roadmap for building5 my plugin.
    4. This system worked reasonably well, allowing me to compartmentalize the steps, backtrack, retrace, revise code, working on a section, then another, sometimes going back to a prior sections at the LLM’s direction.  The LLM still tended to get lost, renamed variables/paths/directories/filenames, but it was less pronounced than before.  I did find it harder to use the “summarize and restart” strategy when dealing with a multi-step code development system.  However, it was still workable since I could upload all the code produced so far.
    5. The result was a new plugin, with better functionality than what I’d written myself 10 years before.  Here, the new strategy of having the LLM break the project into sections and providing a roadmap was particularly helpful.
  3. Strategy:  Conversational Scaffolding
    1. I mentioned “conversational scaffolding” and “frameworks” for discussing things with the LLM above.  This was an overarching and evolving strategy I use to help focus the LLM on the goals, keep it on track, and hopefully help it provide meaningful and useful replies.  The full text of my “prompt framework” file is too large to include here, but I’m happy to provide the highlights.
    2. Personas.  I assigned the LLM three distinct personas with differing backgrounds, strengths, and goals.  Their personas were defined in reference to one another, so the first would activate, the second would then review and interact with the first, after this process completed the third would be activated, perhaps interact with the first two, then it would move on.  I would say this process was rather successful.
    3. Myself.  I would describe myself, my goals, level of expertise, etc.  I found that I if I referred to myself as an expert, the LLM would not be as likely to offer me code proposals – but if I described myself as a newbie, it would recommend I hire a developer rather than tackle such a complex problem myself.
    4. Rules for Conversation.  These are a collection of 12 rules (at last count) which helped myself and the LLM interact.  The high points are:
      1. Answer Numbering, Answer Format, Eliminate Guesswork, Organize Assumptions, Conversational Review, Complex Answers, Context Refresher, Problem Solving Approach, File Structure, @Rules, and Personas.
      2. Each of these items were followed by a few sentences explaining something about how the LLM should be expecting to receive information and react.  My favorite of these was the rule “@Rules” which directed the LLM to begin it’s response by reviewing the Rules and following them.
    5. Knowledge.  There are a number of programming languages and technical topics I’m interested in and have used an LLM to address.  To this point, I solicited a list of useful resources from the LLM and started including a “Knowledge” section where I listed dozens of the most important resources for the languages and API’s I most commonly use.
    6. By beginning each prompt with the above “framework” (~10k of text) and following it up with a short description of my project or a file to consider, I found I was able to jump right into the project without having to provide additional significant background information.
  4. Task 3:  “Project Drift”
    1. This is a considerably more complicated task I will simply refer to as “Project Drift.”  This isn’t a real codename since the developer base is all of exactly one dude, but I don’t want to name the location/website for a variety of reasons.  In any case, Project Drift involves multiple user interfaces, numerous settings, database queries, data sanitation and validation procedures, administrator functions, and numerous other facets.  All of the above tasks and attempts were basically part of the run-up to this (ongoing) project.
    2. Using the LLM’s ability to open and read a ZIP file, as well as propose code, has been invaluable.  This in conjunction with my prompt framework allows me to get the LLM up to speed after a micro-restart – and it’s summarization procedures help me get back in the mindset after I’ve stepped away from the project for a few days.
    3. Since this project isn’t done yet, I can only give a progress report.  It’s going very well.  Much of the heavy lifting, scaffolding of the code, can be assembled for me, tedious database queries and chunks of code provided.  There are still large areas where the LLM is unable to be very helpful – and that relates to pinpointing a bug in the code (or between code sections).  This still requires a knowledgeable hand at the helm.
    4. As a solo-coder, having the assistance of another “persona” to keep me on track with a given section of code has been helpful.  I have only assigned three personas, but I could see adding a few more to fulfill different roles.

I would estimate Project Drift is roughly 30-50% complete, but this is still an incredible amount of progress in a very short time.  I would also estimate it has cut the amount of my development time by 90% (but on the easiest and most tedious stuff).

Software Development with LLMs
  1. Series Plugin Test for Illustrative Purposes Only
  2. ChatGPT WordPress Plugins
  3. Coding with an LLM Sidekick
  1. I know, it feels pretentious, doesn’t it? []
  2. I’ve got the same knee-jerk reaction to “visionary,” “thought leader,” “polymath,” and “futurist.” []
  3. Don’t get me wrong, some of the developers I’d hired simply disappeared while other relationships didn’t work out due to timing.  I don’t think anyone was malicious, just… busy, really. []
  4. Still, the job needs to be done. []
  5. Re-building? []

EDC Bag Materials, Designs, Etc

I’ve been spending way too much time fiddling around thinking about a new every day carry bag, but not a lot of time actually doing anything about it.  I’ve got piles of notes, lots of links, sketches, and product photos.  Here’s a lot of them:

This slideshow requires JavaScript.

My notes and brainstorming are also rather extensive:

  1. Different Potential Uses
    1. Work (laptop, charger), day trips (water bottle), hiking (water bottle, clothing, snacks), running errands / tech / game nights / art
  2. EDC Items
    1. An EDC Bag should be able to accommodate things that I’d be likely to carry about 80% of the time.
    2. Mask, sanitizer, tissue, handkerchief, wipes, plastic baggie
    3. Cell phone, bluetooth pocket, charger pouch, sunglasses, pens, small pad of paper, ¼ A4, Kindle
    4. Keys on interior carabiner, ring whistle loop/loud whistle, lanyards
    5. Interior lining for wallet with RFID blocking, zip ties, carabiner (in pocket?) for keys
    6. On outside, hotel key, BART card
  3. Design Requirements / Goals
    1. When empty, it should be as flat as possible
    2. Wide straps for comfort if carrying something heavy, plus good for stowing a cell phone
    3. Pull rings, paracord top grip handle (also this guide), quick access pockets
    4. Bidirectional, so the main features can be worn over either shoulder
    5. Reduction of metal, heavy parts
    6. Outside straps which can be keep an umbrella, roll of material, or jacket
    7. Outside zippered pouch on the inside (against the body) to make it less likely to be pick pocketed, internal loops for clipping / hooking keys, rings, lanyards
    8. Reinforced corners, grommets
    9. Laptop pouch inside which is higher, area for charger to fall lower
    10. Pouches and pockets near the top
    11. How many pockets, pouches, zippered, velcro, etc?
  4. Materials
    1. Heavy nylon or similar
    2. Internal lining with fleece, ripstop nylon
    3. TPU (thermoplastic polyurethane) or PU (polyurethane) coatings
    4. Foam for padding
    5. Paracord for draw strings, grip wraps
    6. Zippers
Custom Every Day Carry Bag
  1. My Ultimate Bag
  2. Custom Every Day Carry (EDC) Bag
  3. Sewing Practice
  4. EDC Bag Materials, Designs, Etc

Sewing Practice

About two years ago I purchased a few kits from RipstopByTheRoll.com – their Zipper Pouch Kit and their $10 kit.  They were partially for sewing practice and brush off long dormant sewing skills, but mostly for learning some new skills.  (You see, I have zipper cowardice.)

I did do a little bit of sewing at the beginning of the pandemic. 1

In learning how to get started sewing (again) I had to make sense of my sewing machine, settings, and sewing basics:

  • Brother XM3700 overview, settings
    • I had no idea what I was doing or what the dials were supposed to do.  Clockwise from left to right, they are the string tension (should stay between 3-5), left-right movement (irrelevant to straight stitches and seemingly best between 2-3 for zig zags), stitch length (between 1-3), and then the stitch selection dial (sticking with 2 for straight stitch and 3 for zig zags)
    • Using the automatic needle threader which way more helpful than I expected it to be
    • I created a “stitch sampler” where I noted the settings used for each stitch

      Annotated stitch sampler, with a stripe in one corner to orient the stitch setting guide

      Annotated stitch sampler, with a stripe in one corner to orient the stitch setting guide

    • I quickly discovered that the large Gutermann’s thread spool I’d purchased had way too large a core to work with the spool holder on my sewing machine.  Thus, I created a plastic insert that helped keep it from wobbling, which meant it would sometimes bounce right off the spool holder.  It was a little wobbly, so I printed a second one which worked beautifully.

      RBTR zippered pouch, and spool adapters pictured

      RBTR zippered pouch, and spool adapters pictured

  • Zipper sewing foot
  • RBTR $10 “Stuff Sack” Kit

    RBTR Stuff Sack

    RBTR Stuff Sack

  • RBTR Zipper Pouch Kit

    RBTR Zipper Pouch kit, all zipped up

    RBTR Zipper Pouch kit, all zipped up

  • When it comes to the guides by RBTR, I really have no notes.  Their video guides are helpful, detailed, and very accessible.  I got over my zipper cowardice very quickly by just watching the video a few times, letting it play while I went slowly, and pausing to go over each step.  I’m hopeful I’ll be able to use the skills I’ve developed here to build a new EDC bag.
Custom Every Day Carry Bag
  1. My Ultimate Bag
  2. Custom Every Day Carry (EDC) Bag
  3. Sewing Practice
  4. EDC Bag Materials, Designs, Etc
  1. I sewed a mask for a friend of mine before realizing (re-realizing?) I’m not great at sewing and I could do more good helping people who were good at sewing make masks.  After learning about bias tape makers from @Raster and Hackaday, I printed and gave away perhaps 200 or so in the CA area []

Custom Every Day Carry (EDC) Bag

It’s been more than nine thirteen years since my last blog post regarding my every day carry bag.  Something must have happened between August of 2019 when I started this blog post and July of 2023, but for some reason, I just can’t seem to think of what could possibly happened to have derailed an idea.  Rather than putting this post off any longer, I’m just going to publish it largely as-is.

Perhaps it’s time for a progress report or update?

Back around about the summer of 1994 I wanted a bag to carry my stuff in. 12 I needed it to hold a binder, pens, pencils, and other assorted college student things.  Since this was my very first sewing project, I vastly over planned, prepared, and engineered everything.  I made a lot of mistakes, but nothing catastrophic.

1. LESSONS

  • Material.  It turns out that canvas was eventually scrapped in military uses because it doesn’t resist abrasion well and will rot and decompose if not stored carefully.  I also never treated mine to be waterproof with wax or some other substance.  A more modern and durable material is probably ballistic nylon or Cordura.  For a much more lightweight bag, a ripstop nylon, polyester, or polypropylene may work better.
  • Hardware.  I used 2-inch wide plastic buckles and clips on the bag as well as nylon webbing.3 These were the only sizes I could find back in 1994 at the local sewing / crafts store, so that’s what I bought.  In anticipation of making a new bag, I’ve already bought webbing made from seat belt material and plan to 3D print all new hardware.  I would probably add some loops of fabric or cord for attaching a small carabiner, lanyard, or keys.
  • Sewing.  I’m proud of this bag.  While there are a few rookie mistakes4 , it has held up incredibly well over the last 25 years.  I planned it out, drew everything out on large sheets of paper, transferred the designs to the canvas, cut everything leaving generous sewing allowances, and sewed it up with my mother’s already ancient sewing machine.  Next time, I’ll focus on x-box stitching on straps and better stitching practices.
  • Zippered Cowardice.  I admit my own cowardice as a beginner tailor in actively avoiding zippered pouches or pockets.  I’m not certain how important having zippered enclosures in a bag is, but it’s nice to have these.  Then again, I could probably just as easily have a velcro closed pouch that would serve just the same purposes and be less… clanky.
  • Flatness.  One of the things I appreciated most about the bag I made was that when it was empty/nearly empty, I could simply cinch up the strap and sling it across my back, where it would be basically hidden underneath a fleece vest I wear a lot.  This made it easy to take with me – or just ignore when not needed.  On a recent trip to an amusement park, I used one of those give-away schwag drawstring backpacks to similar effect.  When not in use, I just wore it underneath my vest.  When I needed it to care stuff for myself or family, I could tuck some small things inside it – or take it off and wear as intended.

2. BAG TYPES

  • Backpack.  A normal school-type backpack with two shoulder straps, large interior zippered area for books, binders, supplies, and a smaller outside zippered area for smaller supplies such as pencils, pens, etc.  There are usually a large number of interior pockets.
  • Laptop Backpack.  This type of backpack has an extra padded divider or compartment for protecting a laptop and a little extra space for carrying power cords and such.
  • Satchel.  A soft sided cross body single strap with a flap that folds over the front and can be buckled closed.
  • Courier/Messenger Bag.  A wide side slung bag with a wide strap suitable for carrying several stacks of large documents.   Usually has a large flap that folds over the front that buckles closed.
  • Laptop Bag.  Similar to a messenger back, but just wide enough to accommodate a laptop in a padded interior section, typically with a handle on top.
  • Tactical Backpack.  A backpack with a LOT of pockets, straps, buckles, harnesses, handles, etc.  Ranges from small to very large.
  • Fanny Pack.  I hate to admit the practicality of these bags because they’re so incredibly ugly.
  • Sling Messenger Bag.  “A bag with one strap that is designed to be carried on one shoulder.”  These tend to have a narrow and rounded triangular appearance, with a strap attaching to the left or right of the base.
  • Cortility Bag.  In episode #69 of the Cortex Podcast on 5/22/2018, CGP Grey talked about getting a small bag to carry a minimum amount of useful things since his everyday wear does not have enough storage.  Such things included his wallet, phone, headphones, earplugs, airpods case, a small camera, aspirin, etc.  This is my exact problem.  I want to be able to carry just a few more things with me.
  • Drawstring Backpack.  These are the kinds of bags that are basically drawstring bags where the loops of cinching cord are anchored at the bottom, so they can also serve as backpack straps.  They’re simple, easy to make, pack down super small, but they’re also… simple and don’t have a lot of room for many features.

3. STUFF

  • Stuff I Carry.  I’m not a survivalist, camping enthusiast, or have any special need for a bug-out bag.  Hopefully, I’ll never find myself in such a position that this bag will be what makes the difference.  With changes in life and lifestyle over the years, the things I need to carry has changed as well.
    • High School / College:  Books, notebooks, pens, pencils, playing cards
    • Grad School: Laptop plus books, notebooks, pens, pencils
    • Work Life: Sunglasses, bulky cell phone, laptop, small notebook/paper, pens, pencil, camera
    • Life Work:
      • Sunglasses, small cell phone, small notebook/paper, pens, pencil, small tools, sometimes a charger/portable battery and/or a laptop,
  • Bag Needs.  While pondering what I really need a bag for these days.  I’m no longer really very far from the things I need whether I’m at work, home, with the family, or just someplace near my car.  Now I’m of two minds on the topic.  Part of me wants something akin to a “tactical backpack” which is, depending upon your viewpoint, a glorified fanny pack worn across the back or a single strap side sling narrow backpack with lots of hooks, loops, straps, etc.  Part of me wants an unobtrusive and nearly invisible “drawstring backpack.”

I still use that old bag fairly regularly.

Annnnnd, that’s about where my blog post from 2019 left off…

Custom Every Day Carry Bag
  1. My Ultimate Bag
  2. Custom Every Day Carry (EDC) Bag
  3. Sewing Practice
  4. EDC Bag Materials, Designs, Etc
  1. Mind you, this was back in the mid-90’s when it wasn’t uncommon for someone to have a fanny pack []
  2. Looking back, I was going for more of a manly Indiana Jones satchel / bugout bag []
  3. The technical term for these nylon straps []
  4. having way more than 10 stitches per inch basically perforated the canvas underneath the webbing []

ChatGPT WordPress Plugins

This is kinda bananas.  Years ago I wrote a plugin to solve a problem I had.  I wanted a simple WordPress plugin where I could insert a shortcode into a blog post, specify a series title, and have it automatically search up all the other blog posts that used the same shortcode and series title, and then insert a nice looking list of blog posts in that series in chronological order.

It was one of my first plugins, still available on WordPress.org – just hidden since it hasn’t been updated in almost a decade.  It still works to this very day, if occasionally a little buggy.  After several WordPress versions, it no longer properly displays the series title, which is a real shame.

On a whim, I tried using ChatGPT to generate some plugins.

Here’s an example of my old plugin and the new ChatGPT written plugin (in this order):

Default Series Title

See how bad that was? It completely mangled the title.

Edit:  Since publishing this post, I realized that I would have to choose between

  1. Leaving the old defunct plugin in place just to make a point about how it didn’t stand the test of a decade’s worth of WordPress updates, but then also leaving broken series titles sprinkled through my back catalog of blog posts.
  2. Go back through nearly 10 years of blog posts12 to change them over to the new plugin shortcode.
  3. Disable the old plugin, but have the new plugin work with the old shortcode as well as it’s own new shortcode, at the cost of losing an example of how bad the old plugin performed.

I went with option 3.  Just take my word for it, it looked bad.

He makes a valid point

He makes a valid point

Now for the ChatGPT version:

Software Development with ChatGPT
  1. ChatGPT WordPress Plugins

It took me about an hour to whip up a working WordPress plugin with the same core functionality.  I would break down the time I spent as follows:

Time Spent Creating Series Plugin with ChatGPT

But, that’s not all!  You see, as I was writing this blog post, I realized it would be fun to include a pie chart to indicate the time I’d spent on this.  Unfortunately, the plugin I had written to do exactly this many years ago has apparently completely given up the ghost.  Thus, before I proceeded to this very sentence, I used ChatGPT to create a plugin for displaying custom pie charts!

Time Spent Creating Pie Chart Plugin with ChatGPT

Obviously, this plugin took a lot longer.  The first few versions were having all kinds of problems between the HTML Canvas code and trying to figure out how to make sure the javascript was not loading too early or too late.  In the end, I just asked it whether it was capable of even creating a pie chart – and it gave me a piece of workable javascript.  I told it to refactor the plugin using this same javascript, and then it was a matter of fine tuning the result.

If you don’t know anything about writing WordPress plugins, you could probably use ChatGPT to create a very simple plugin.  However, once it got slightly more complicated, it would likely require some troubleshooting to figure out what was happening.  In the series plugin it took me a while to root through the WordPress functions to figure out that apparently ChatGPT was trying to use a function in a way that simply did not work.  I explained to ChatGPT that that particular function could not operate in that way, explained how the data it was feeding into that function needed to be first modified, and then asked it to refactor the code.  From that point forward, it started to look a lot better.  There were some additional quirks – like putting more than one series title in a single post would only display one.  I suspect these problems of ChatGPT taking a shortcut to generate code, hardcoding certain variables and names, not considering that it might need to operate more than once on the page, may be difficult for it to anticipate and address.  Without some degree of WordPress development knowledge, I think a novice user armed only with ChatGPT would need to do a lot of refactoring, asking the program to generate the plugin all over from scratch many times, before arriving at a workable result.  Then again, a million monkeys at typewriters, right?

I think ChatGPT could be great for creating relatively simple plugins like a series plugin, a pie chart plugin, or even a table of contents plugin.  However, having seen how much time it cut out of the development process, I think it would be interesting to try developing an A/B testing plugin or more complicated plugin.

I think the next task to see if I can get it to generate QMK code for a keyboard, Arduino code, Raspberry Pi code, or a chrome extension.

I can already see some ways to improve both of the ChatGPT generated plugins used in this blog post.  My series plugin included two arrows at the bottom so the reader could navigate to the prior or next post in the series.  And I think it would be great if the chart plugin had a feature where I could specify the units, so the magnitude data would be included with the labels.  I may try getting it to shoehorn these updates later…

If you see these reflected in the charts above, I must have already done it.  :)

Software Development with LLMs
  1. Series Plugin Test for Illustrative Purposes Only
  2. ChatGPT WordPress Plugins
  3. Coding with an LLM Sidekick
  1. NGL, I can really be a lot some times. []
  2. Um, you’ve probably gathered that. []

Series Plugin Test for Illustrative Purposes Only

The only purpose for this post is to serve as a reference for a more interesting and useful post.

Software Development with LLMs
  1. Series Plugin Test for Illustrative Purposes Only
  2. ChatGPT WordPress Plugins
  3. Coding with an LLM Sidekick
Software Development with LLMs
  1. Series Plugin Test for Illustrative Purposes Only
  2. ChatGPT WordPress Plugins
  3. Coding with an LLM Sidekick

[custom_pdf_generator visitor_data=“John Doe”]

 

DIY Carved Eraser QR Code Stamp

After some modest success carving some neat designs into pink erasers, I tried making a QR code stamp.  It didn’t work well at all, with exactly just one impression working … sometimes.

The first attempt took a really long time and turned out terribly.  After a few days break, and some mental distance from the project, I returned with some new ideas and inspiration.

Here was my new approach and plan:

1. The Stamp

  1. Go Slow.  Proceeding slowly and methodically is always a good idea with sharp instruments.  I went fairly slowly the first time, but this time I would be even more methodical.
  2. Cutting.  Rather than using the carving blades for the QR code features, I switched to using a craft knife.  It was just too hard to cut precise lines with a V or U shaped blade, managing not just the direction and speed of the cut – but the depth as well – for both sides of the blade.  The craft blade let me focus on just one side at a time.  I used the blade to cut at about a 45 degree angle along one side, then other side.
  3. Don’t Cut Too Much.  I used calipers to measure the pixels cut into my first attempt as well as the stamped result.  I discovered \the stamp pixels were very slightly larger than their rubber counterparts.  This tells me it would be better to cut too little rubber – and cut more later if necessary.
  4. Removing Scraps.  Rather than sticking my big old fingers into the eraser or trying to pop it out with the blade, I used a pair of 3D printed tweezers to pluck them out.

2. The QR Code

  1. Optimize the QR Code.  There are several ways to optimize a QR code for eraser / stamp carving. 1.  I used as many of these methods as I could:
    1. “Pixel” Size.
      1. As you add more information into a QR code, the QR code generator will need to use more black and white units2 to encode the information.  After some tinkering it seems like the smallest QR code that can be generated is 441 total pixels, 21 wide by 21 tall.  The absolute largest QR code I could generate looks like one of those “magic eye” posters.  I didn’t even try to count how many pixels wide this thing was.  It’s 9,216 pixels, 96 wide by 96 tall.

        This slideshow requires JavaScript.

      2. I was having a hard time carving a stamp 21 pixels wide into a 24.5 mm3 wide eraser, so the idea of carving more than 21 lines into an eraser by hand seemed not feasible.  The very next step up from the 21×21 grid would be a 25×25 grid, so I knew I had to find a way to limit the data, find the best error correction, and find a way to cut these small pixels and thin features.
    2. Proper Error Correction.
      1. QR Codes have built in “error correction” that allows the user’s scanning device to scan information from a partially formed, damaged, or obscured code.  These settings range from L (low), M (medium), Q (quality), and H (high quality) able to error correct from up to 7%, 15%, 25%, and 30% damage respectively.  Lowering the error correction allows you to create a smaller QR Code, but it will also be less robust.
      2. I fiddled with these settings a lot to find the maximum amount of data I could put into a QR code while still retaining a maximum size of 21×21 pixels.  I was able to encode about 16 characters in a L, 13 characters in a M, 10 characters in a Q, 6 characters in a H.  The code stores numeral easier and requires more pixels to store letters and special characters.
      3. My first attempt used an error correction level of L, but was basically unusable as there must have been more than 7% distortion.  This time, I decided to try for a very high level of error correction with the Q setting for 25%.
    3. Reducing Data.  This is where I used some tricks you may, or may not, be able to replicate.
      1. URL Shortener.  A TinyURL link to my Instagram page requires 29 characters.  Looking above, this would immediately suggest a 21×21 pixel QR code would not be possible.
      2. Trimming a Link.  After some fiddling, I realized that as long as the data encoded looked like a URL (as in some characters separated by a “.”), the QR code scanner would interpret it as a link.  This means we can skip the “http://” and “https://”, saving 7-8 characters!  Unfortunately, this still doesn’t let me encode the shortest URL that TinyURL could give me which requires 20 characters after discarding the “http” stuff.
      3. Maybe Just a Domain?  Maybe you just wanted to point someone to your website and not a big long link, shortened with a URL shortener.  Let’s work the numbers backwards.  Most commonly used domains end with “.com”, “.org”, “.biz” – with 4 characters each.  Using the information above, this means we could use a domain name with up to 12 characters for an L encoded QR code, 9 for an M, 6 for a Q, and just 2 for an H.  While it would be easy to find a 12 character domain, you’re stuck with only a 7% margin for your error correction.  A domain with 6 to 9 characters for Q and M would allow for 25% and 15% error correction.  You can still find 6 character “.com” domain, but… they’re unlikely to be very memorable.  This isn’t necessarily a problem.  You might be able to find a good short domain with an unmemorable name, but forwards the user to your real website.  The problem, of course, is that no one is going to want to click on that link.
      4. How About a custom URL Shortener?  It’s still possible to purchase a short URL, but they’re pricey.  I happened to buy a good one several years ago and have hung on tightly to it.  I slapped a YOURLS install on it, and have been using it ever since.  Using my own URL shortener means I can keep the URL down to just 9 characters – including the TLD!

Okay, back to carving.  I grabbed my headphones, put on some music, and took it very slowly – a little under two hours.  Here’s some progress photos:

This slideshow requires JavaScript.

Here’s how it looked (with some additional shots to show the original design overlaid):

This slideshow requires JavaScript.

I stamped this design 9 times – and all 9 were more or less easily scannable.  The neat thing about this design is that it points to a URL shortener I own, so not only is it about as tiny as possible, but I can change the destination if I ever needed – without having to spend two hours recarving an eraser stamp!

Eraser Stamp Carving
  1. Carved Eraser Stamping
  2. Further Adventures in Eraser Carving
  3. DIY Carved Eraser QR Code Stamp
  1. I won’t get too much into the weeds on the actual method of generating QR codes, mostly because I haven’t studied the math in it, but I did find a great article which has a lot of good background info and explanations []
  2. I’ll call them “pixels” from this point forward []
  3. Just barely under an inch []

Further Adventures in Eraser Carving

I thought it would be neat to try cutting a QR code stamp.  (Skip to the end to see the one time I was able to get the stamp to work)

Getting the pattern ready for carving

Getting the pattern ready for carving

The obvious problem is this would require an incredibly detailed and precise approach to carving.  To get the smallest QR code that can still contain a URL, it would be limited to 16 characters, the lowest error correction (7%) rate, and would still have 21×21 pixels (441 total).  After a little testing, I realized the code needs a little white space around the QR code to read properly.  This means 23×23 pixels all carved into a less than 1″ square area.  I know from the design of the eraser carving station that the eraser is 24.5 mm wide… so each pixel is roughly 1mm square.

I tried several things that definitely did not work well:

    • Printing the design in one of my templates, trimmed, colored in with a pencil, taped in place, then rubbed onto the eraser to transfer the design.
    • This didn’t really work very well since the pencil trace to rubbing process introduces a lot of error.  I tested this by trying to scan the reversed drawing on the eraser.  Didn’t work at all.
    • The 1mm wide pixels would have been a nightmare to cut with even the smallest carving blade, so I switched to my craft blade.  The blade is so sharp and incisions so thin, that many times it was difficult to see where or whether I had made a cut.  Once I switched from a vertical cut to a 45 degree angle, it seemed to get a little bit easier and cleaner.
    • After I was about a quarter done I tried using a fine tip sharpie to color in the pixels.  After a lot of hassle, I could get this to scan, so I kept going.
    • The darkened pattern was still a bit messy and my cutting wasn’t significantly better.
    • I flipped the eraser over and tried a new tactic.  I taped a template to the eraser and tried to cut the design through the paper.  This didn’t work well because when I cut very small pixels out of the design, the paper quickly lost cohesion and then became useless.
    • Finally I pulled up a large picture of the QR code on my laptop and tried to keep to the design as best I could.  It wasn’t pretty – but I was done.

The results were less than stellar.  The leftover ink from the sharpie discolored the inkpad a little and got transferred onto the first few stamp impressions.  Out of a dozen different impressions, only one could be scanned by my phone.

Darkened with a sharpie, partially carved

Darkened with a sharpie, partially carved

If I tried this again (and, let’s be honest, I probably will) I would use the template / pencil transfer method just to place “landmarks” and then refer back to the large display on the laptop.

Stamp, stamp, stamp

Stamp, stamp, stamp

Lastly, I was able to get just one impression that could be scanned:

One single scannable stamp impression

One single scannable stamp impression

The reason the bit of paper is a little oddly shaped is that I had stamped onto a piece of scrap cardstock.  I’d stamped on other pieces of paper, cards, and even on that same piece of cardstock.  This was the one time it worked.

Eraser Stamp Carving
  1. Carved Eraser Stamping
  2. Further Adventures in Eraser Carving
  3. DIY Carved Eraser QR Code Stamp

Carved Eraser Stamping

I recently stumbled across the world of fantastically charming mini prints and carved erasers by Serena Rios McRae aka Cactus Clouds Art.  This short Instagram post provides an excellent overview of her process.

Serena’s artwork is evocative, accessible, and affordable.  I bought several of her prints the other day.  She also posts how-to’s on YouTube and provides plenty of links to her recommended supplies (Serena’s lists and affiliate links).

These looked like so much fun, I bought a pile of cheap pink erasers off Amazon, repurposed an old set of stamp carvers we had lying around (I had done some linoleum block printing back in high school and my wife had a small stamp making kit from years before), and gave it a shot.  The kids had a great time with this while I fretted about whether they were going to jab their fingers and how many bandaids I’d have to have handy.

After their first stamp, I hacked together a 3D printed holder.  Despite measuring the erasers carefully, it was too long and really, too big for what it needed to be.  Here you can see version 01 taped to a piece of mahogany wood left over from my ukulele project.

This slideshow requires JavaScript.

There were several problems with this first attempt.  The holder was a little too long, so the eraser would shift back and forth.  It was also much bigger than necessary.  I designed it with those large fins on the side to make it easy to tape down, but it really wasn’t necessary and just made rotating the eraser holder a little more unwieldy.  While my kids were carving things using this holder, I went to work printing a few accessories.

3D printed screw top blade container, extra blade handle

3D printed screw top blade container, extra blade handle

The blades came in a little plastic baggie, so I printed a bespoke screw top container for them so they can be stored securely.  I also printed another blade handle so that two people could carve stamps at the same time – one using the original wooden holder and the other using the printed holder.

The next version was more compact and had dimples on the edges which I hoped would make it easier to hold.  I also added some little ridges inside so the eraser wouldn’t fall through.  Here they are:

Eraser holders for carving, versions 1, 2, 3, 4, and 5

Eraser holders for carving, versions 1, 2, 3, 4, and 5

The dimples didn’t work.  They weren’t deep enough and my hand couldn’t really grip it very well to keep it from moving while I was carving.  The area for the eraser was a little too long.  Versions 2-5 involved tuning the length just right.  Each one takes about an hour to print and used about $0.30 of plastic.  The final result fit the erasers like a glove.  They nestle in the holder perfectly and are easy to poke out using the little hole.  Admittedly, they might only fit the specific cheap erasers I found.

Here’s my process:

I created a page of eraser templates, which match the length and width of the large and small edges.  Of course, the long section matches the long side of the eraser – but the shorter section only matches the short side of the eraser if you tip it over.

Eraser templates

Eraser templates

I got to use several iterations of the eraser holder for this next section:

All the pieces, laid out nice and orderly

All the pieces, laid out nice and orderly

The process is pretty easy.  Put the eraser in the eraser holder – it should slip right in, drop in snugly, and lie flush with the top edge of the plastic holder.  After cutting out a paper strip, it’s trimmed to size, creased to locate the central point, and a pencil drawing (drawn as I’d like to see it printed).  This is taped upside down onto the eraser, rubbed along the back (a coin would work very well, but I just used one of the extra eraser holders), and the design is neatly transferred to the eraser.  The neat thing about this process is that I could design something in Inkscape, print it into the template, and color it in with the pencil for transferring to the eraser.

Lastly, let’s see the result!

Eraser stamp!

Eraser stamp!

As you can see, the final stamped result matches the orientation of the little drawing.  I just wish I’d saved the little scrap of paper with the original drawing on it!  The eraser holder was a joy to use and the final result looks every bit as great as I was hoping.

If I keep making these, I’ll probably want to upgrade my setup to include Serena’s recommended stamp pad and sharpener (you’ll see them linked in Serena’s Amazon link above).  I’d like to design something to make easy to hold the eraser, center it, and make a clean even stamp, but don’t have a great idea for one yet.  I’ll keep pondering this and maybe whip something up this weekend.

Eraser Stamp Carving
  1. Carved Eraser Stamping
  2. Further Adventures in Eraser Carving
  3. DIY Carved Eraser QR Code Stamp
  1. I mean, I guess it’s version 1 – but I labeled all the purple ones starting with 1 so… []