First-time configuration of the monitors is accomplished through the Yo-Yo WiFi Manager library. It’s a captive portal system, not unlike the popular WiFiManager library, but in this case it has the ability to push the network configuration out to multiple devices at once. This MIT-licensed library, which [David] has been developing with [Mike Vanis] and [Andy Sheen], should be very helpful for anyone looking to bring multiple sensors online quickly.
We’re also very interested in what [David] calls the Approximate library. This allows an ESP8266 or ESP32 to use WiFi signal strength to determine when its been brought in close proximity to particular device, and from there, determine its IP and MAC address. In this project, it’s used to pair the “Device Wheel” monitor with its intended target.
Once locked on, the monitor’s black and white wheel will spin when it detects traffic from the paired device. We think this library could have some very interesting applications in the home automation space. For example, it would allow a handheld remote to control whatever device the user happens to be closest to at the time.
Whether you follow along with the instructions and duplicate the meters as-is, or simply use the open source libraries that power them in your own project, we think [David] has provided the community with quite a gift in these unique gadgets.
The Silicon Labs Si4735 is a single-chip solution for receiving AM, FM, and shortwave radio. With a bit of hacking, it even supports single sideband (SSB). All you’ve got to do is provide it with a suitable control interface, which [Ricardo Lima Caratti] has done with his recent project.
Using an Arduino Pro Mini, a handful of buttons, and a standard TFT display, [Ricardo] has put together a serviceable little receiver with a fairly impressive user interface. We especially like the horizontal bars indicating the signal to noise ratio and received signal strength. The next evolution would be to put this whole rig into some kind of enclosure, but for now he seems content to control the action with a handful of unlabeled buttons on a piece of perfboard.
Of course, the presentation of this receiver isn’t really the point; it’s more of a proof of concept. You see, [Ricardo] is the person who’s actually developed the library that allows you to control the Si4735 from your microcontroller of choice over I2C. He’s currently tested it with several members of the official (and not so official) Arduino family, as well as the ESP32.
The documentation [Ricardo] has put together for his MIT licensed Arduino Si4735 library is nothing short of phenomenal. Seriously, if all open source projects were documented even half as well as this one is, we’d all be a few notches closer to world peace. Even if you aren’t terribly interested in adding shortwave radio reception to your next project, you’ve got to browse his documentation just to see where the high water mark is.
The Arduino IDE has a bit of a split personality. On the one hand, it is a simple environment where you can just pick and choose a few libraries, write a few lines of code, and make lots of interesting things. On the other hand, it is also an ecosystem in which many different boards and libraries can be supported. Writing a great library that everyone can easily use takes a little forethought. There is an official style guide, but a recent post by [Nate] from Sparkfun points out lessons learned from writing more libraries than most people.
Of course, as you might expect, some of this is a matter of opinion, and [Nate] admits that. For example, they always use the serial port at 115,200 baud, but they do note that 9,600 baud is also popular. They also suggest making code as readable as possible, which is usually good advice. In the old days, writing terse code might lead to higher efficiency, but with modern compilers, you ought to get a tight final result even when doing things in a pretty verbose fashion.