When [Adam, HA8KDA] is just not busy together with his PhD research, he mentors a gaggle of scholars desirous about engineering. To show them a variety of matters, he got down to build a small and entertaining embedded project as they watch and take part alongside the way in which. With this LED-adorned ATTiny13A undertaking, [Adam] demonstrated schematic and PCB design, then taught C++ fundamentals and intricacies – particularly with regards to constructing low-footprint software program – and tied all of it collectively right into a real-world system college students may take dwelling after the undertaking. His course went method past the “Hey world”s we sometimes anticipate, and a few of us can solely want for a college expertise like this.
He shares the PCB information and software program with us, but additionally talks in regards to the C++20 framework he’s developed for this ATTiny. The ATTiny13A may be very low cost, and in addition very restricted – you get 1K of ROM and 64 bytes of RAM. This framework allows you to make good use of it, offering the fundamentals like GPIO wiggling, but additionally issues like low-power operation hooks, tender PWM with optionally available multi-phase operation assist and EEPROM entry. College students may write their very own animations for this system, and he includes them in the repo, too!
In academic tasks, it pays to maintain code direct and clear, cruft-less and accessible to college students. These are the issues you’ll be able to solely obtain if you actually perceive the instruments you’re working with, which is the proper place for instructing about them! [Adam] intends to point out that C++ is greater than appropriate for low-resource units, and tells us in regards to the EEPROM class code he wrote – compiling into the identical quantity of directions as an Meeting implementation and consuming the identical quantity of RAM, whereas offering compile-time checks and fail-safe syntax.
We’ve talked about utilizing C++ on microcontrollers earlier than, getting further compile-time options with out overhead, and this undertaking illustrates the idea nicely. [Adam] asks us all, and particularly our fellow C++ wizards, for our opinions on the framework he designed. Might you obtain much more with this easy {hardware} – make the code extra strong, clear, have it do extra throughout the restricted assets?
What may you construct with an ATTiny13, particularly with such a framework? A flashy hairclip wearable, maybe, or a code-learning RF-remote-controlled outlet. We’ve additionally seen a tiny camera trigger for endurance races,, a handheld Flappy Bird-like console, and many more!