Posts | Comments

Planet Arduino

Archive for the ‘task’ Category

Escape rooms are awesome for people who like to solve puzzles, see how things work, or enjoy a mystery. Everyone reading this falls into at least one of those categories. We enjoy puzzles and mysteries, but we have a fondness for seeing how things work. To this end, we direct your attention to [doktorinjh]’s “Bomb Disarming Puzzle in a Suitcase” Game, which is a mysterious puzzle box he built himself. I guess the mystery is mostly in the gameplay, which you can watch below because he shows us his build photos and describes the hardware inside.

At its heart is an Arduino Mega, a wise choice since our back-of-the-napkin estimation puts his I/O count over forty-five and the Mega can handle them all with a few pins to spare. Working inside the confines of a briefcase came with its own challenges, but we adore the way he used the hexagon theme in the top panel to allow for knob clearance. It was so subtle that we almost missed it.

The escape room theme is delightful, and we appreciate the mix of games, aesthetics, and techno-trickery in many forms.

What was your first Arduino program? Probably an LED blinker — that seems to be the “hello world” of microcontrolllers. You probably moved on to things a little more complicated pretty quickly. At some point, things get harder because the Arduino lacks an operating system.

There are operating systems that will run on the Arduino. They aren’t full-featured like Windows or Linux, but they allow you to run multiple tasks that are both isolated from each other (to some degree) and have a way to cooperate (that is, synchronize, share data and resources, and so on). One such operating system is ChibiOS. It will run on AVR- and ARM-based devices. You can find documentation about the entire project on the home page along with other ports.

The problem with adopting a new operating system is always getting started. [ItKindaWorks] has started a video series on using ChibiOS and has posted three installments so far (see below; one is about getting started, the other two cover messaging, mutexes, and priorities).

If you want to follow along with the videos, the code is available on GitHub. We aren’t sure if he’s planning more videos, but these will be more than enough to get you started.

According to the ChibiOS project, they are better than many common similar operating systems because of their static design (you can put the processor to sleep without causing problems). They also support true threads instead of simple tasks, meaning that you can dynamically create and destroy threads and synchronize threads easily.

If you are building sophisticated software that needs multiple things occurring at once, having an operating system can make life a lot easier. We’ve seen examples of using ChibiOS ranging from motor control to MIDI players. There are quite a few choices other than ChibiOS, too, if you look around.


Filed under: Arduino Hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook