-
Bluetooth Build Button, Part 7: crashes and animations
2019/05/11
Previously, we added LEDs for feedback (Part 6: lights and a power switch), and ended up with a number of problems to fix. The most blocking was an issue where making changes to the firmware started causing inexplicable crashes.
Crashes
While working on animation code, I ran into an issue with the firmware where adding doing seemingly trivial things in the code (declaring new unused variables or adding empty methods to a class for example) would compile but result in completely non-functional firmware. After flashing the firmware, the board LED would blink red a couple times and then become unresponsive.
I took a couple troubleshooting steps: could I be out of memory? Checked the global memory usage output by the compiler and also at runtime (with a functioning version of the firmware) and there appeared to be pleny of free memory.
A friend suggested the possibility of defective hardware (a bad block in memory where the firmware is stored, maybe), but I had some extra, identical boards to test on and they had the same issue.
Another possibility could be something in the toolchain, but debugging that felt like a total rabbit hole.
Read more... -
Bluetooth Build Button, Part 6: lights and a power switch
2019/03/19
With a basic software implementation completed (Part 5: the software), we can spend some time using it day-to-day and build incremental improvements.
Power switch
I mentioned previously that I was opening the enclosure to turn the button on and off, so streamlining that behavior is my first target.
A little bit of time in Fusion 360, and I have a mount for the power switch. It’s meant to be a bit of a tight fit, as the switch should hopefully “snap” into the enclosure.
The first print ended up being way too tight, so after destroying it with pliers, it’s back to Fusion for a few tweaks, and finally I have something that works:
Read more... -
Bluetooth Build Button, Part 5: the software
2019/03/18
Now that v1.0 is out of the way (Part 4: v1.0 complete), we can spend some time using it day-to-day and build incremental improvements.
Goals
I’ve made it through a week with the build button as a daily driver of launching tests, and it works great! The battery life is surprisingly sufficient and has lasted over several workdays without a charge.
However, there are two issues I’m hoping to address via software.
The first is that the button indiscriminately enters
Read more...rake spec/n
when pressed via an iTerm binding. Even though I’ve been doing a lot of work in Rails projects, I also work in projects that are node.js or even Rails + webpacker, where I need to run test suites for both Ruby and Javascript. We simply need a better way to be smart about what gets run. -
Bluetooth Build Button, Part 4: v1.0 complete
2019/03/09
With the rough-ins in place (Part 3: the enclosure rough-ins), we can build out the enclosure.
Battery
After seeing that the 2000mAh battery wasn’t going to fit, I moved to modeling the 500mAh one and tucked it under the Feather:
Eventually I’d like everything to snap in without screws or hardware, but snaps take some modeling work and iteration – screw holes take about three seconds, so in they go.
Flat for ports
Read more... -
Bluetooth Build Button, Part 3: the enclosure rough-ins
2019/03/04
With the core idea now functional (Part 2: the proof-of-concept), it’s time to start working on a proper enclosure.
For building models, I’ve been using Autodesk Fusion 360. It’s a powerful parametric modeling tool and has free non-commercial licensing. The license is only one year long, but can be renewed each year.
What is parametric modeling?
Let’s compare direct and parametric modeling software for a minute, because the distinction is important.
A couple years back before I knew the difference, I was working in a direct modeling tool, the now-defunct Autodesk 123D Design (which was a wonderful, simple, intuitive tool, but that’s neither here nor there). I ended up designing the most complex model I’ve built yet – an internet-connected, Raspberry Pi-powered, touchscreen RGB lamp for an Introduction to Connected Devices course at Case Western Reserve University.
It was pretty complex – it was tooless and had an interlocking sliding-rail system for opening and closing, as well as mounting features for the hardware inside:
Read more... -
Bluetooth Build Button, Part 2: the proof-of-concept
2019/02/27
Well it didn’t take much to get the core idea (Part 1: new project) working.
What you’re seeing here is the Adafruit Feather nrf52832 acting as a bluetooth keyboard, paired to my Macbook, and sending
CTRL+ALT+F12
when I push the giant red button (mostly because it’s unlikely to be used by anything). It’s powered by a 500mAh lipo battery and not wired to the Macbook at all.In the video, I have iTerm bound to run
Read more...rake spec \n
onCTRL+ALT+F12
: -
Bluetooth Build Button, Part 1: project planning
2019/02/26
It’s time for a new project! I’ve been starting projects and enjoying not finishing them, but I’ve been feeling the itch to carry something small and focused all the way through design, documentation, and delivery.
The Idea
A few years ago I built a build button to run my tests – a simple Teensy that connects as a HID keyboard and sends a key combo when the button is pushed. In IDEs, I bound the key combo to running tests, and in iTerm to send
rake spec \n
(not very flexible for moving between types of projects).Moving between computers with USB and USB-C ports makes the original button a little more annoying to use, so I’d like to go wireless. In 2019 there’s lots of great bluetooth hardware available. The Adafruit Feather nrf52832 is relatively inexpensive, has a battery charging circuit, can emulate a bluetooth keyboard, and I happen to have two of them already.
Read more...