Writing Arduino Libraries, An Expert View

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.

Continue reading “Writing Arduino Libraries, An Expert View”

Weather Station Gets Much-Needed Upgrades

Weather stations are a popular project, partly because it’s helpful (and interesting) to know about the weather at your exact location rather than a forecast that might be vaguely in your zip code. They’re also popular because they’re a good way to get experience with microcontrollers, sensors, I/O, and communications protocols. Your own build may also be easily upgradeable as the years go by, and [Tysonpower] shows us some of the upgrades he’s made to the popular Sparkfun weather station from a few years ago.

The Sparkfun station is a good basis for a build though, it just needs some updates. The first was that the sensor package isn’t readily available though, but some hunting on Aliexpress netted a similar set of sensors from China. A Wemos D1 Mini was used as a replacement controller, and with it all buttoned up and programmed it turns out to be slightly cheaper (and more up-to-date) than the original Sparkfun station.

All of the parts and code for this new station are available on [Tysonpower]’s Github page, and if you want to take a look at a similar station that we’ve featured here before, there’s one from three years ago that’s also solar-powered.

Continue reading “Weather Station Gets Much-Needed Upgrades”

Long-Range RFID With Feedback

Not long ago, we published an article about researchers adding sensor data to passive RFID tags, and a comment from a reader turned our heads to a consumer/maker version which anyone can start using right away (PDF). If you’re catching up, passive RFID technology is behind the key fobs and stickers which don’t need power, just proximity to the reader’s antenna. This is a much “hackier” version that works with discrete signals instead of analog ones. It will not however require writing a new library and programming new tags from the ground up just for the user to get started, so there is that trade-off. Sparkfun offers a UHF reader which can simultaneously monitor 25 of the UHF tags shown in this paper.

To construct one of these enhanced tags, the antenna trace is broken and then routed through a switching device such as a glass-break sensor, temperature limit switch, doorbell, or light sensor. Whenever continuity is restored the tag will happily send back its pre-programmed data, and the reader will acknowledge that somewhere one of the tags is seeing some activity. Nothing says this could not be applied to inexpensive RFID readers should you just want a temperature warning for your gecko terrarium or light sensor to your greenhouse‘s sealed controller.

Thank you, [Mike Massen], for your tip on RFID Doing More Than ID.

Continue reading “Long-Range RFID With Feedback”

LED-ifying A Guitar

Say you have a guitar, an expensive guitar – one of only three like it. And say this guitar sounds great, but it’s missing something. It needs something, but something that won’t ruin the finish. Over at Sparkfun, [Englandsaurus] was asked to come up with a really cool looking mod to a three-of-a-kind guitar – covering the body with LED strips to create light patterns on the guitar.

In order not to damage or modify the guitar [Englandsaurus] sandwiched the body between two plexiglass sheets, connected together by 3D printed clips. The clips have a dual purpose – they hold the plexiglass pieces to the guitar and also act as conduits for a pair of fiber optic tubes that run around the edge of the body. In order that the color goes all the way around the guitar’s edge without a break in the light, the fiber optic cables are offset. At each clip light is fed into them. One cable runs between two clips, skipping one in between, and the second cable runs between the skipped clips. This allows light to flow around the guitar’s body.

At nearly 500W at full-white, these LEDs draw a lot of power, however, at full brightness they’re overpoweringly bright, so [Englandsaurus] used some WonderFlex, a moldable, diffuse plastic sheet, to cover them. Even with this, the LEDs aren’t run at full brightness. The fiber optic cables, though, need full brightness due to their covering.

Around 1600 LEDs went in to this mod and the guitar itself hasn’t been modified.  Everything is removable, and the guitar would go back to its original self if the strips were taken off. Take a look at Strumbot, another project where the original guitar wasn’t modified, or a really cool scrap metal guitar.

Continue reading “LED-ifying A Guitar”

Hackaday Links: April 22, 2018

Eagle 9 is out. Autodesk is really ramping up the updates to Eagle, so much so it’s becoming annoying. What are the cool bits this time? Busses have been improved, which is great because I’ve rarely seen anyone use busses in Eagle. There’s a new pin breakout thingy that automagically puts green lines on your pins. The smash command has been overhauled and now moving part names and values is somewhat automatic. While these sound like small updates, Autodesk is doing a lot of work here that should have been done a decade ago. It’s great.

Crypto! Bitcoin is climbing up to $9,000 again, so everyone is all-in on their crypto holdings. Here’s an Arduino bitcoin miner. Stats of note: 150 hashes/second for the assembly version, and at this rate you would need 10 billion AVRs to mine a dollar a day. This array of Arduinos would need 2 Gigawatts, and you would be running a loss of about $10 Million per day (minus that one dollar you made).

Are you going to be at Hamvention? Hamvention is the largest amateur radio meetup in the Americas, and this year is going to be no different. Unfortunately, I’ll be dodging cupcake cars that weekend, but there is something of note: a ‘major broadcaster’ is looking for vendors for a ‘vintage tech’ television series. This looks like a Canadian documentary, which adds a little bit of respectability to this bit of reality television (no, really, the film board of Canada is great). They’re looking for weird or wacky pieces of tech, and items that look unique, strange, or spark curiosity. Set your expectations low for this documentary, though; I think we’re all several orders of magnitude more nerd than what would be interesting to a production assistant. ‘Yeah, before there were pushbutton phones, they all had dials… No, they were all attached to the wall…”

The new hotness on Sparkfun is a blinky badge. What we have here is a PCB, coin cell holder, color changing LED, and a pin clasp. It’s really not that different from the Tindie Blinky LED Badge. There is, however, one remarkable difference: the PCB is multicolored. The flowing unicorn locks are brilliant shades of green, blue, yellow, pink, purple, and red. How did they do it? We know full-color PCBs are possible, but this doesn’t look like it’s using a UV printer. Pad printing is another option, but it doesn’t look like that, either. I have no idea how the unicorn is this colorful. Thoughts?

Defcon is canceled, but there’s still a call for demo labs. They’re looking for hackers to show off what they’ve been working on, and to coax attendees into giving feedback on their projects.

Review: IoT Data Logging Services With MQTT

For the last few months, I had been using Sparkfun’s Phant server as a data logger for a small science project. Unfortunately, they’ve had some serious technical issues and have discontinued the service. Phant was good while it lasted: it was easy to use, free, and allowed me to download the data in a CSV format. It shared data with analog.io, which at the time was a good solution for data visualization.

While I could continue using Phant since it is an open-source project and Sparkfun kindly releases the source code for the server on Github, I thought it might be better to do some research, see what’s out there. I decided to write a minimal implementation for each platform as an interesting way to get a feel for each. To that end, I connected a DHT11 temperature/humidity sensor to a NodeMCU board to act as a simple data source.

Continue reading “Review: IoT Data Logging Services With MQTT”

Hackaday’s Open Hardware Summit Experience

Last week was the Open Hardware Summit in Denver Colorado. This yearly gathering brings together the people and businesses that hold Open Hardware as an ideal to encourage, grow, and live by. There was a night-before party, the summit itself which is a day full of talks, and this year a tour of a couple very familiar open hardware companies in the area.

I thought this year’s conference was quite delightful and am happy to share with you some of the highlights.

Continue reading “Hackaday’s Open Hardware Summit Experience”