They don’t call slot machines one-armed bandits for nothing. And although it’s getting harder and harder to find slot machines with actual pull-able handles instead of just big buttons, you can easily simulate the handle at home with the right kind of limit switch, as [Andrew Smith] did with this micro slot machine.
This baby slot machine is built around the Adafruit 5×5 NeoPixel grid, which is an add-on for the QT Py. As you’ll see in the brief demo video after the break, the switch actuates on release, which starts the lights a-spinning. [Andrew] says the constraints of the SAMD21-powered QT Py made this a particularly fun challenge.
Whereas most physical slot machines have different reel sequences, this build uses just one. [Andrew] declared hex values to ID each color, and then created the reel manually with different color frequencies. When the lever is released, the columns are animated and slowly to come to rest at a random offset. You can check out the code on GitHub.
The progress for electronics over the past seven decades or so has always trended towards smaller or more dense components. Moore’s Law is the famous example of this, but even when we’re not talking about transistors specifically, technology tends to get either more power efficient or smaller. This MIDI keyboard, for example, is small enough that it will fit in the space of a standard business card which would have been an impossibility with the technology available when MIDI first became standardized, and as such is the latest entry in our Business Card Challenge.
[Alana] originally built this tiny musical instrument to always have a keyboard available on the go, and the amount of features packed into this tiny board definitely fits that design goal. It has 18 keys with additional buttons to change the octave and volume, and has additional support for sustain and modulation as well. The buttons and diodes are multiplexed in order to fit the IO for the microcontroller, a Seeed Studio Xiao SAMD21, and it also meets the USB-C standards so it will work with essentially any modern computer available including most smartphones and tablets so [Alana] can easily interface it with Finale, a popular music notation software.
Additionally, the project’s GitHub page has much more detail including all of the Arduino code needed to build a MIDI controller like this one. This particular project has perhaps the best size-to-usefulness ratio we’ve seen for compact MIDI controllers thanks to the USB-C and extremely small components used on the PCB, although the Starshine controller or these high-resolution controllers are also worth investigating if you’re in the market for compact MIDI devices like this one.
C and C++ are powerful tools, but not everyone has the patience (or enough semicolons) to use them all the time. For a lot of us, the preference is for something a little higher level than C. While Python is arguably more straightforward, sometimes the best choice is to work within a full-fledged operating system, even if it’s on a microcontroller. For that [Chloe Lunn] decided to port Unix to several popular microcontrollers.
This is an implementation of the PDP-11 minicomputer running a Unix-based operating system as an emulator. The PDP-11 was a popular minicomputer platform from the ’70s until the early 90s, which influenced a lot of computer and operating system designs in its time. [Chloe]’s emulator runs on the SAMD51, SAMD21, Teensy 4.1, and any Arduino Mega and is also easily portable to any other microcontrollers. Right now it is able to boot and run Unix but is currently missing support for some interfaces and other hardware.
[Chloe] reports that performance on some of the less-capable microcontrollers is not great, but that it does run perfectly on the Teensy and the SAMD51. This isn’t the first time that someone has felt the need to port Unix to something small; we featured a build before which uses the same PDP-11 implementation on a 32-bit STM32 microcontroller.
We love the simplicity of Arduino for focused tasks, we love how Raspberry Pi GPIO pins open a doorway to a wide world of peripherals, and we love the software ecosystem of Intel’s x86 instruction set. It’s great that some products manage to combine all of them together into a single compact package, and we welcome the recent addition of Seeed Studio’s Odyssey X86J4105.
[Ars Technica] recently looked one over and found it impressive from the perspective of a small networked computer, but they didn’t dig too deeply into the maker-friendly side of the product. We can look at the product documentation to see some interesting details. This board is larger than a Raspberry Pi, but its GPIO pins were laid out in exactly the same order as that on a Pi. Some HATs could plug right in, eliminating all the electrical integration leaving just the software issue of ARM vs x86. Tasks that are not suitable for CPU-controlled GPIO (such as generating reliable PWM) can be offloaded to an on-board Arduino-compatible microcontroller. It is built around the SAMD21 chip, similar to the Arduino MKR and Arduino Zero but the pinout does not appear to match any of the popular Arduino form factors.
The Odyssey is not the first x86 single board computer (SBC) to have GPIO pins and an onboard Arduino assistant. LattePanda for example has been executing that game plan (minus the Raspberry Pi pin layout) for the past few years. We’ve followed them since their Kickstarter origins and we’ve featured creative uses here and there. LattePanda’s current offerings are built around Intel CPUs ranging from Atom to Core m3. The Odyssey’s Celeron is roughly in the middle of that range, and the SAMD21 is more capable than the ATmega32U4 (Arduino Leonardo) on board a LattePanda. We always love seeing more options in a market for us to find the right tradeoff to match a given project, and we look forward to the epic journeys yet to come.
Have you built a macro keypad yet? This is one of those projects where the need can materialize after the build is complete, because these things are made of wishes and upsides. A totally customized, fun build that streamlines processes for both work and play? Yes please. The only downside is that you actually have to like, know how to build them.
Suffer no more, because [Andy Warburton] can show you exactly how to put a macro pad together without worrying about wiring up a key switch matrix correctly. [Andy]’s keypad uses the very affordable Seeeduino Xiao, a tiny board that natively runs Arduino code. Since it has a SAMD21 processor, [Andy] chose to run CircuitPython on it instead. And lucky for you, he wrote a separate guide for that.
Practicalities aside, the next best thing about macro keyboards is that they can take nearly any shape or form. Print a case from Thingiverse as [Andy] did, or build it into anything you have lying around that’s sturdy enough to stand up to key presses and won’t slide around on your desk.
One of the great things about the Arduino environment is that it covers a wide variety of hardware with a common interface. Importantly, this isn’t just about language, but also about abstracting away the gory details of the underlying silicon. The problem is, of course, that someone has to decode often cryptic datasheets to write that interface layer in the first place. In a recent blog post on omzlo.com, [Alain] explains how they found a bug in the Arduino SAMD21 analogRead() code which causes the output to be offset by between 25 mV and 57 mV. For a 12-bit ADC operating with a reference of 3.3 V, this represents a whopping error of up to 70 least-significant-bits!
While developing a shield that interfaces to 24 V systems, the development team noticed that the ADC readings on a SAMD21-based board were off by a consistent 35 mV; expanding their tests to a number of different analog pins and SAMD21 boards, they saw offsets between 25 mV and 57 mV. It seems like this offset was a known issue; Arduino actually provides code to calibrate the ADC on SAMD boards, which will “fix” the problem with software gain and offset factors, although this can reduce the range of the ADC slightly. Still, having to correct for this level of error on a microcontroller ADC in 2019 — or even 2015 when the code was written — seems really wrong.
After writing their own ADC read routine that produced errors of only between 1 mV and 5 mV (1 to 6 LSB), the team turned their attention to the Arduino code. That code disables the ADC between measurements, and when it is re-enabled for each measurement, the first result needs to be discarded. It turns out that the Arduino code doesn’t wait for the first, garbage, result to finish before starting the next one. That is enough to cause the observed offset issue.
It seems odd to us that such a bug would go unnoticed for so long, but we’ve all seen stranger things happen. There are instructions on the blog page on how to quickly test this bug. We didn’t have a SAMD21-based Arduino available for testing before press time, but if you’ve got one handy and can replicate these experiments to verify the results, definitely let us know in the comments section below.
Hackers have a multitude of skills, many are well-versed in the ways of all things that blink and flash. These abilities have often be applied to the field of jewelry and human adornment, and many LEDs have been employed in this work. [Deshipu] has been attempting something a touch different however, by constructing a tiny TFT pendant.
The basic idea is not dissimilar from those USB photo keychains of recent history. A SAMD21 Cortex M0+ serves as the brains of the operation, with the tiny microcontroller being soldered to a custom PCB that makes up the body of the pendant. A ST7735S TFT LCD screen is then attached to act as the display. Charging and delivery of images is done over USB, which can be handled natively by the SAMD21.
Currently, the pendant is capable of displaying 16-color BMPs, with the intention to create a converter for animated GIFs in the pipeline. Potential upgrades also involve creating a larger battery pack to sit behind the wearer’s neck, as currently the device has just 8 mAh to work with.