Running 57 Threads At Once On The Arduino Uno

When one thinks of the Arduino Uno, one thinks of a capable 8-bit microcontroller platform that nonetheless doesn’t set the world alight with its performance. Unlike more modern parts like the ESP32, it has just a single core and no real multitasking abilities. But what if one wanted to run many threads on an Uno all at once? [Adam] whipped up some code to do just that.

Threads are useful for when you have multiple jobs that need to be done at the same time without interfering with each other. The magic of [Adam]’s ThreadHandler library is that it’s designed to run many threads and do so in real time, with priority management as well. On the Arduino Uno, certainly no speed demon, it can run up to 57 threads concurrently at 6ms intervals with a minumum timing error of 556 µs and a maximum of 952 µs. With a more reasonable number of 7 threads, the minimum error drops to just 120 µs.  Each thread comes with an estimated overhead of 1.3% CPU load and 26 bytes of RAM usage.

While we struggle to think of what we could do with more than a handful of threads on an Arduino Uno, we’re sure you might have some ideas – sound off in the comments. ThreadHandler is available for your perusal here, and runs on SAMD21 boards as well as any AVR-based boards that are compatible with TimerOne. We’ve seen other work in the same space before, such as ChibiOS for the Arduino platform. Video after the break.

Continue reading “Running 57 Threads At Once On The Arduino Uno”

Supersized Weather Station Uses Antique Analog Meters

For most of us, getting weather information is as trivial as unlocking a smartphone or turning on a computer and pointing an app or browser at one’s weather site of choice. This is all well and good, but it lacks a certain panache that old weather stations had with their analog dials and stained wood cases. The weather station that [BuildComics] created marries both this antique aesthetic with modern weather data availability, and then dials it up a notch for this enormous analog weather station build.

The weather station uses 16 discrete dials, each modified with a different label for the specific type of data displayed. Some of them needed new glass, and others also needed coils to be modified to be driven with a lower current than they were designed as well, since each would be driven by one of two Arduinos in this project. Each are tied to a microcontroller output via a potentiometer which controls the needle’s position for the wildly different designs of meter. The microcontrollers themselves get weather information from a combination of real-world sensors outside the home of [BuildComics] and from the internet, which allows for about as up-to-date information about the weather as one could gather first-hand.

The amount of customization of these old meters is impressive, and what’s even more impressive is the project’s final weight. [BuildComics] reports that it took two people just to lift it onto the wall mount, which is not surprising given the amount of iron in some of these old analog meters. And, although not as common in the real world anymore, these old antique meters have plenty of repurposed uses beyond weather stations as well.

Continue reading “Supersized Weather Station Uses Antique Analog Meters”

Arduino Micro Pushes Animal Crossing’s Buttons

Repetitive tasks in video games often find a way of pushing our buttons. [Facelesstech] got tired of mashing “A” while catching shooting stars in Animal Crossing, so he set out to automate his problem away. After briefly considering rigging up a servo to do the work for him, he recalled a previous effort that used an Arduino Teensy to automate a bowling mini-game in Zelda: Breath of the Wild and decided to use a microcontroller to catch stars for him.

[Facelesstech] programmed an Arduino Pro Micro to fake controller button presses. It starts with a couple of presses to identify itself to the Switch, before generating an endless stream of button presses that automatically catch every shooting star. Hooking it up is easy—an on-the-go adapter allows the Switch’s USB-C port to connect directly to the Arduino’s Micro-USB port, even supplying power!

[Facelesstech] also designed a compact 3D-printed case that packages up the Arduino Pro Micro along with an ISP header for easy updating. The case even lets the Arduino’s power LED shine through so you know that it’s working!

If you, too, need to automate video game button-pushing, [Facelesstech] has kindly uploaded the source code and 3D designs for you to try. If you’d prefer something a little more low-tech, perhaps you might try a mechanical button pusher.

Continue reading “Arduino Micro Pushes Animal Crossing’s Buttons”

The IEEE Builds A Smart Watch

It used to be that building your own watch was either a big project or it meant that you didn’t really care about how something looked on your wrist. But now with modern parts and construction techniques, a good-looking smart watch isn’t out of reach of the home shop. But if you don’t want to totally do it yourself, you can turn to a kit and that’s what [Stephen Cass] did. Writing in IEEE Spectrum, he took a kit called a Watchy and put it through its paces for you.

Watchy is an open source product that uses an ESP32, an E-ink display, and costs about $50. The display is 1.5 inches — good enough for a watch — and it has a real time clock, a vibration motor, an accelerometer, and four buttons. The whole thing runs on a 200 mAh lithium polymer battery. The charger is microUSB and you can also upload software to it using the usual Arduino tools.

However, [Stephen] found that none of the examples he tried would work at first. He found problems with the Mac software, but he also had problems under Windows. The answer? Switching to a Raspberry Pi seemed to work and once the watch was wiped clean, the Mac tools would work, too. It sounds like this isn’t a common problem, but he has to erase the watch with the Pi before each programming cycle.

Unlike a normal Arduino program, all the work in a typical Watchy program happens in setup() so the watch can mostly sleep and it updates the 200×200 typically just once a minute. As an example, [Stephan] wrote a watch face that uses an old Irish alphabet to tell time. He plans to add code to grab online data, too, and the phone has support for connecting wirelessly and parsing JSON to make tasks like that easier.

We always thought the EZ430-Chronos was a good-looking watch, but its screen is dated now. You can also pick up a lot of cheap import watches that can be hacked.

Eyesight Guardian Polices Your Poor Pupils

Don’t know about you, but over the last year or so, we have gone from spending ten or twelve hours a day at this computer to upwards of sixteen or eighteen. Fortunately there’s a window behind the monitor for taking those 20/20/20 breaks that are supposed to prevent eye strain, but it’s so hard to remember (and boring) to do it. And nobody needs yet another thing to remember in the name of self-care.

[Daniel Hingston] certainly agrees. As you’ll see in the delightful video after the break, [Daniel] has made a game out of the whole process of stopping every twenty minutes to spend twenty seconds looking at a point that’s at least twenty feet away. Once the break is over, [Daniel] uses the dual-purpose start button to acknowledge having looked away for 20 seconds. The device is meant to clip onto the corner of any monitor, and [Daniel] has provided several sizes of the bridge piece so that everyone can find their fit.

The Guardian’s guts are pretty simple — an Arduino Pro Mini runs the stop watch and a TFT display to show the graphics that live on an SD card. This is a great way to preserve your eyesight by gamifying something we all know we should be doing. It might be nice to add a break timer that counts up to 25 or thereabouts so you have time to stand up and come back. If you press the button too soon, it scolds you and you have to start your eye break over.

Need some more self-care lately? Our own [Jenny List] has your back in these interesting times.

Continue reading “Eyesight Guardian Polices Your Poor Pupils”

Don’t Tase Me, Keeb!

Okay, so this doesn’t really use a taser — that’s just click bait and we apologize. An actual taser would be a terrible way to train yourself to be a better typist, because depending on where you choose to deliver the shock, you could damage your typing nerves pretty quickly with a few milliamps at 50,000 volts.

Instead of a taser, [nobody6502] got a pack of prank gum off of Amazon that delivers a much more doable shock that is painful enough to get the user to type more carefully. [nobody6502] set up a simple no-pain, no-train website that presents random English words one at a time and checks for typos against an open-source list of nearly half a million entries. Misspell a word, and a get a relay-driven shock from the gum circuit.

The main brain of this pain trainer is a Particle Argon board which has I/O pins that can be controlled from the web. When the website detects a typo, it sends a signal to the Argon, which turns on a relay that activates the shock mechanism. What’s most impressive is that [nobody6502] doesn’t have a full-blown computer and programmed everything on an iPad. Check out the build video after the break.

Are you a hunt and peck typist? There’s a negative reinforcement keyboard for that.

Continue reading “Don’t Tase Me, Keeb!”

Tired Of Popcorn? Roast Coffee Instead

We’ve seen a lot of coffee roaster builds over the years. [Ben Eagan] started his with a hot-air popcorn maker. If you think it is as simple as putting beans in place of the popcorn, think again. You need to have good control of the heat, and that requires some temperature monitoring and a controller — in this case, an Arduino. [Ben’s] video below shows how it all goes together.

With the Arduino and the power supply strapped to the sides, it looks a bit like something out of a bad post-apocalypse movie. But it looks like it gets the job done.

In addition to the Arduino, a thermocouple measures the temperature and that takes a little circuitry in the form of a MAX31855. There’s also a relay to turn the heater on and off. There are other ways to control AC power, of course, and if a relay offends your sensibilities you can always opt for a solid state one.

Continue reading “Tired Of Popcorn? Roast Coffee Instead”