Node-RED Laser Shooting Gallery Goes Anywhere

When you think of a shooting gallery, you might envision a line of tin cans set up along a split-rail fence, or a few rows of ducks or bottles lined up at a carnival. But what do these have in common? You, standing in one spot, and shooting in the same general direction. You’re exposed! If those targets could shoot back, you’d be dead within seconds. Wouldn’t it be more fun if the targets were all around you in 360°? We think so, too.

So how could you possibly set up a shooting gallery this way? [Another Maker] already solved that problem for you with ESP32s and Node-RED (YouTube). Each target has an ESP32, a laser sensor, and an LED that lights up when the target is ready, and turns off once it’s been hit. They all make an enticing ‘shoot me’ sound that goes with their graphics, and a second mp3 plays upon direct hit.

The PVC gun houses an ESP8266, a laser module at the end of the barrel, and runs on a cylindrical USB battery slipped down in the secondary grip. [Another Maker] can spread the targets out far and wide, as long as they all stay in range of the localized WiFi access point.

The best part is that the Node-RED system is target-agnostic — it doesn’t care how many you have or how they’re made, and it can juggle up to 250 of them. Because of the way the target objects are programmed, it would be quite easy to add actuators that make them drop down or fall backward when hit. You could also implement [Another Maker]’s fantastic suggestion of hitting arcade buttons with NERF darts instead. Charge those lasers and fire at the break button to see the demo and walk-through video.

If you plan to knock the targets down or over in your implementation, you’ll want an easy way to reset them. Here’s a scrap-built shooting gallery that uses a windshield wiper motor to set ’em back up.

Add-On Makes ESP32 Camera Board Easier To Program

Don’t you just hate it when dev boards have some annoying little quirk that makes them harder to use than they should be? Take the ESP32-CAM, a board that started appearing on the market in early 2019. On paper, the thing is amazing: an ESP32 with support for a camera and an SD card, all for less than $10. The trouble is that programming it can be a bit of a pain, requiring extra equipment and a spare finger.

Not being one to take such challenges lying down, [Bitluni] has come up with a nice programming board for the ESP32-CAM that you might want to check out. The problem stems from the lack of a USB port on the ESP32-CAM. That design decision leaves users in need of a USB-to-serial adapter that has to be wired to the GPIO pins of the camera board so that programs can be uploaded from the Arduino IDE when the reset button is pressed. None of that is terribly complex, but it is inconvenient. His solution is called cam-prog, and it takes care of not only the USB conversion but also resetting the board. It does that by simply power cycling the camera, allowing sketches to be uploaded via USB. It looks to be a pretty handy board, which will be available on his Tindie store.

To demonstrate the add-on, he programmed his ESP32-CAM and connected it to his enormous ping pong ball video wall. The video quality is about what you’d expect from a 1,200 pixel display at 40 mm per pixel, but it’s still pretty smooth – smooth enough to make his interpretive dance moves in the last few minutes of the video pretty interesting.

Continue reading “Add-On Makes ESP32 Camera Board Easier To Program”

How Low Can An ESP32 Go?

Many of us have experimented with the ESP32 microcontroller, attracted by its combination of WiFi and a powerful processor core, but how many of us will have explored all of its many on-board features? One of the more interesting capabilities of this chip comes in the form of its ultra-low-power (ULP) co-processor, an extra core that allows an ESP32 to function while sipping tiny quantities of power with the ever-hungry main cores turned off.

It’s a feature that [Max Kern] has used to great effect in his low power ESP32 handheld computer, where he’s paired the chip with a low-power Sharp Memory LCD and used the ESP32’s ULP core to keep the display alive while the ESP cores are sleeping. Software wise the device sports basic PDA and clock functionality including an RSS parser, all of which can be seen in the video below the break. Its inspiration came from Panic’s crank-equipped Playdate console, with which it shares the Sharp display.

Seeing this device reminds us of some of the badges featuring ESP32 power that we’ve seen over the last few years. An event badge creator has a constant battle to give the device enough battery life to last the distance. It’s a problem the designers of the SHA 2017 badge solved with an e-ink unit, but perhaps the Sharp display could offer a cost-effective alternative for new designs.

Continue reading “How Low Can An ESP32 Go?”

ESP32 Audio Sampling With Interrupts And IRAM

Interrupting while someone is talking is rude for humans, but smart for computers. [Ivan Voras] shows how to use interrupts to service the ESP32 analog to digital converters when sampling sound. Interestingly, he uses the Arduino IDE mixed with native ESP-IDF APIs to get the best performance.

Like most complex interrupt-driven software, [Ivan’s] code uses a two-stage interrupt strategy. When a timer expires, an interrupt occurs. The handler needs to complete quickly so it does nothing but set a flag. Another routine blocks on the flag and then does the actual work required.

Because the interrupt service routine needs to be fast, it has to be in RAM. [Ivan] uses the IRAM_ATTR attribute to make this work and explains what’s going on when you use it.

…the CPU cores can only execute instructions (and access data) from the embedded RAM, not from the flash storage where the program code and data are normally stored. To get around this, a part of the total 520 KiB of RAM is dedicated as IRAM, a 128 KiB cache used to transparently load code from flash storage.The ESP32 uses separate buses for code and data (“Harvard architecture”) so they are very much handled separately, and that extends to memory properties: IRAM is special, and can only be accessed at 32-bit address boundaries.

This is very important because some ESP-IDF calls — including adc1_get_raw — do not use this attribute and will, therefore, crash if they get pushed out to flash memory. At the end, he muses between the benefit of using an OS with the ESP32 or going bare metal.

If you want to know more about the Arduino on ESP32, we covered that. We also dug deeper into the chip a few times.

Hackaday Podcast 045: Raspberry Pi Bug, Rapidly Aging Vodka, Raining On The Cloud, And This Wasn’t A Supercon Episode

Hackaday editors Mike Szczys and Elliot Williams talk over the last three weeks full of hacks. Our first “back to normal” podcast after Supercon turns out to still have a lot of Supercon references in it. We discuss Raspberry Pi 4’s HDMI interfering with its WiFi, learn the differences between CoreXY/Delta/Cartesian printers, sip on Whiskey aged in an ultrasonic jewelry cleaner, and set up cloud printing that’s already scheduled for the chopping block. Along the way, you’ll hear hints of what happened at Supercon, from the definitive guide to designing LEDs for iron-clad performance to the projects people hauled along with them.

Take a look at the links below if you want to follow along, and as always tell us what you think about this episode in the comments!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 045: Raspberry Pi Bug, Rapidly Aging Vodka, Raining On The Cloud, And This Wasn’t A Supercon Episode”

Start Your Day With The Mountain That Rises

Like many of us, [Zach Archer] enjoys the comfort of his darkened room so much that he has trouble getting up and facing the day. To make things a little easier for himself, he decided to put together a custom alarm clock that would fill his mornings with the glorious glow of LEDs; and since he finds the mountains an inspirational sight he decided to wrap the whole thing up in a 3D printed enclosure that resembles snow capped peaks.

But even Bob Ross himself couldn’t have imagined a snowy mountain range that featured an integrated e-ink screen. The big 4.2″ panel is connected to a custom designed PCB by [romkey], which was graciously donated for this project. An ESP32 runs the show, providing a convenient web interface to control not only the clock, but various aspects of the mountain’s internal LEDs such as fade in time and total duration.

[Zach] says he originally printed the mountains in PLA, but the heat generated by the LEDs eventually started to cause things to warp. Switching over to translucent PETG not only solved the heat problem, but made for a very effective LED diffuser. Rather than complex animation patterns, he’s found that smoothly transitioning between different shades of blue and green seems to work best for him in the mornings.

This isn’t the first time we’ve seen somebody use LEDs to get them out of bed in the morning, but we do appreciate the aesthetic that [Zach] has achieved here between the design of the mountains and the impressive artwork on the e-ink display. Then again, we’re also quite partial to this version that looks like a warp core, so our tastes do run the gamut.

Zombies Ate Your Neighbors? Tell Everyone Through LoRa!

As popular as the post-apocalyptic Zombie genre is, there is a quite unrealistic component to most of the stories. Well, apart from the whole “the undead roaming the Earth” thing. But where are the nerds, and where is all the apocalypse-proof, solar-powered tech? Or is it exactly this lack of tech in those stories that serves as incentive to build it in the first place? Well, maybe it doesn’t have to be the end of the world to seek for ways to cope with a collapse of our modern communication infrastructure either. Just think of natural disasters — an earthquake or hurricane causing a long-term power outage for example. The folks at [sudomesh] tackle exactly this concern with their fully open source, off-grid, solar-powered, LoRa mesh network, Disaster Radio.

The network itself is built from single nodes comprising of a battery-backed solar panel, a LoRa module, and either the ESP8266 or ESP32 for WiFi connectivity. The idea is to connect to the network with your mobile phone through WiFi, therefore eliminating any need for additional components to actually use the network, and have the nodes communicate with each other via LoRa. Admittedly, LoRa may not be your best choice for high data rates, but it is a good choice for long-range communication when cellular networks aren’t an option. And while you can built it all by yourself with everything available on [sudomesh]’s GitHub page, a TTGO ESP32 LoRa module will do as well.

If the idea itself sounds familiar, we did indeed cover similar projects like HELPER and Skrypt earlier this year, showing that LoRa really seems to be a popular go-to for off-grid communication. But well, whether we really care about modern communication and helping each other out when all hell breaks loose instead of just primevally defending our own lives is of course another question.