Turn A Cheap Bluetooth Speaker Into An Audio Receiver

Cheap Bluetooth speakers come in all different kinds of shapes and colors, and they let you conveniently stream music, for example from your mobile phone. For [mcmchris], they had one significant shortcoming though: while most of them come with some auxiliary input port as alternative audio source, they usually lack an audio output port that would let him route the audio to his more enjoyable big-speaker sound setup. Lucky for him, it’s a problem that can be fixed with a wire cutter and soldering iron, and so he simply turned his cheap speaker into a Bluetooth audio receiver.

After opening the speaker, [mcmchris] discovered a regular F-6188 Bluetooth audio module built around the BK8000L chip, with the audio jack connected to the chip’s aux input pins. Taking a close look at the PCB, the solution seemed obvious: cut the connection to the chip’s aux input pins, and connect the audio jack parallel to the audio signal itself. After some trial and error, the output pins of the on-board op amplifier seemed to provide the best audio signal for his shiny new output jack. You can see more details about the speaker’s inner life and a demonstration in the video after the break — in Spanish.

If the concept looks familiar to you, we’ve indeed seen a very similar approach to equip a Google Home Mini with an audio output jack before. The alternative is of course to just build a decent sized Bluetooth speaker yourself.

Continue reading “Turn A Cheap Bluetooth Speaker Into An Audio Receiver”

It’s All In The Libs – Building A Plugin System Using Dynamic Loading

Shared libraries are our best friends to extend the functionality of C programs without reinventing the wheel. They offer a collection of exported functions, variables, and other symbols that we can use inside our own program as if the content of the shared library was a direct part of our code. The usual way to use such libraries is to simply link against them at compile time, and let the linker resolve all external symbols and make sure everything is in place when creating our executable file. Whenever we then run our executable, the loader, a part of the operating system, will try to resolve again all the symbols, and load every required library into memory, along with our executable itself.

But what if we didn’t want to add libraries at compile time, but instead load them ourselves as needed during runtime? Instead of a predefined dependency on a library, we could make its presence optional and adjust our program’s functionality accordingly. Well, we can do just that with the concept of dynamic loading. In this article, we will look into dynamic loading, how to use it, and what to do with it — including building our own plugin system. But first, we will have a closer look at shared libraries and create one ourselves.

Continue reading “It’s All In The Libs – Building A Plugin System Using Dynamic Loading”

TerraDome Gives Plants And Dinosaurs A New Home

Housing exotic plants or animals offer a great opportunity to get into the world of electronic automation. When temperature, light, and humidity ranges are crucial, sensors are your best friend. And if woodworking and other types of crafts are your thing on top, why not build it all from scratch. [MagicManu] did so with his Jurassic Park themed octagonal dome built from MDF and transparent polystyrene.

With the intention to house some exotic plants of his own, [MagicManu] equipped the dome with an Arduino powered control system that regulates the temperature and light, and displays the current sensor states on a LCD, including the humidity. For reasons of simplicity regarding wiring and isolation, the humidity itself is not automated for the time being. A fan salvaged from an old PC power supply provides proper ventilation, and in case the temperature inside the dome ever gets too high, a servo controlled set of doors that match the Jurassic Park theme, will automatically open up.

[MagicManu] documented the whole build process in a video, which you can watch after the break — in French only though. We’ve seen a similar DIY indoor gardening project earlier this year, and considering its simple yet practical application to learn about sensors, plus a growing interest in indoor gardening itself (pun fully intended), this certainly won’t be the last one.
Continue reading “TerraDome Gives Plants And Dinosaurs A New Home”

Watch The World Spin With The Earth Clock

With the June solstice right around the corner, it’s a perfect time to witness first hand the effects of Earth’s axial tilt on the day’s length above and beyond 60 degrees latitude. But if you can’t make it there, or otherwise prefer a more regular, less deprived sleep pattern, you can always resort to simulations to demonstrate the phenomenon. [SimonRob] for example built a clock with a real time rotating model of Earth to visualize its exposure to the sun over the year.

The daily rotating cycle, as well as Earth’s rotation within one year, are simulated with a hand painted plastic ball attached to a rotating axis and mounted on a rotating plate. The hand painting was done with a neat trick; placing printed slivers of an atlas inside the transparent orb to serve as guides. Movement for both axes are driven by a pair of stepper motors and a ring of LEDs in the same diameter as the Earth model is used to represent the Sun. You can of course wait a whole year to observe it all in real time, or then make use of a set of buttons that lets you fast forward and reverse time.

Earth’s rotation, and especially countering it, is a regular concept in astrophotography, so it’s a nice change of perspective to use it to look onto Earth itself from the outside. And who knows, if [SimonRob] ever feels like extending his clock with an aurora borealis simulation, he might find inspiration in this northern lights tracking light show.

This is a spectacular showpiece and a great project you can do with common tools already in your workshop. Once you’ve mastered earth, put on your machinists hat and give the solar system a try.

Strike a Chord With This LED Ukulele

You may laugh off the ukulele as a toy or joke instrument, and admittedly, their starting price tag and the quality that usually comes with such a price tag doesn’t help much to get a different opinion on that. But it also makes it the perfect instrument for your next project. After all, they’re easy to handle, portable, and cheap enough to use a drill and other tools on them without too much regret. Plus, a little knowledge to play can get you far, and [Elaine] can teach you the essential, “all the pop songs use it”, four chords with her Arduino powered LED Ukulele.

As first step, [Elaine] drilled holes in her ukulele’s fingerboard to place some LEDs at all the positions required to play the four chords C, G, Am, and F. Connected to an Arduino attached to the ukulele’s back, each chord will light up its associated LEDs to indicate the finger positions required to play the chord itself. Taking the teaching part a step further, her next step is to extend each LED with a second, light sensing one, and read back if the fingers are placed at the correct position.

[Elaine] has already plans to turn the ukulele into an interactive game next. And if four chords are eventually not enough for you anymore, have a look at another LED based project teaching to play any major, minor and major seventh chord on the ukulele.

Blowing Rings With Cannons, Fogs, And Lasers

In today’s healthy lifestyle oriented world, blowing smoke rings won’t impress too many people anymore. Unless of course you are [NightHawkInLight] and blow them with a vortex cannon and add lasers for visual effects. Although, his initial motivation was to build a device that could shoot lost frisbees out off the trees in his backyard disc golf course, and as avid enthusiast of shooting things through the air using a propane torch, he opted for a vortex cannon to avoid the risk of injuries shooting a projectile may cause.

With safety in mind from the beginning, [NightHawkInLight] chose to build the cannon in ways that won’t expose him or people following his footsteps to any toxic fumes. The barrel is formed by securing a roll of terrace board and simply pulling it into a cone. A series of PVC pipes and adapters build the combustion chamber that fits the terrace board barrel on its one end, and the propane torch nozzle on its other end. For easier aim and stability, he also adds a tripod mount.

Since air vortices are, well, air, and therefore not visible by themselves, they don’t offer the most visual excitement. [NightHawkInLight] solved this with a fog machine attached to the barrel, and a laser line module, which you can see for yourself in his build video after the break. In a previous vortex cannon project we could also see a more outdoorsy approach to add visibility to it.
Continue reading “Blowing Rings With Cannons, Fogs, And Lasers”

Directly Executing Chunks of Memory: Function Pointers In C

In the first part of this series, we covered the basics of pointers in C, and went on to more complex arrangements and pointer arithmetic in the second part. Both times, we focused solely on pointers representing data in memory.

But data isn’t the only thing residing in memory. All the program code is accessible through either the RAM or some other executable type of memory, giving each function a specific address inside that memory as entry point. Once again, pointers are simply memory addresses, and to fully utilize this similarity, C provides the concept of function pointers. Function pointers provide us with ways to make conditional code execution faster, implement callbacks to make code more modular, and even provide a foothold into the running machine code itself for reverse engineering or exploitation. So read on!

Function Pointers

In general, function pointers aren’t any more mysterious than data pointers: the main difference is that one references variables and the other references functions. If you recall from last time how arrays decay into pointers to their first element, a function equally decays into a pointer to the address of its entry point, with the () operator executing whatever is at that address. As a result, we can declare a function pointer variable fptr and assign a function func() to it: fptr = func;. Calling fptr(); will then resolve to the entry point of function func() and execute it.

Admittedly, the idea of turning a function into a variable may seem strange at first and might require some getting used to, but it gets easier with time and it can be a very useful idiom. The same is true for the function pointer syntax, which can be intimidating and confusing in the beginning. But let’s have a look at that ourselves.

Continue reading “Directly Executing Chunks of Memory: Function Pointers In C”