Global Status Board Keeps Eye On COVID-19 Situation

When it comes to keeping abreast of the COVID-19 pandemic, there are basically two schools of thought. Some people would rather not hear the number of confirmed cases or deaths, and just want to focus on those who recovered. That’s fair enough. But others want to have all of the available data at their disposal so they can form their own conclusions about what’s happening with this virus on a global scale. Looking at this incredible COVID-19 status board, we’ll give you one guess which category [Reuben] falls into.

Note the laser engraved component labels

Constructed out of 2020 extrusion with both 3D printed and laser cut parts, this wall-mounted display is built to last. Clearly [Reuben] believes we’re in this one for the long haul, and taking a peek at the plethora of data points this device can show at once, it’s not hard to see why.

Stats are pulled down every hour from a JSON API by an ESP32 and stored on an SD card. A running total of confirmed cases, deaths, and recoveries are shown on several TFT displays located behind the face of the display. On the right, the relative severity of the infection in 32 different countries is visualized with LEDs of varying brightness.

Perhaps the most visually striking element of the display is the large annunciator panel on the left side, which lights up to show various conditions all over the world. We appreciate that [Reuben] has thought ahead and added a light that can be used once a vaccine is deployed for COVID-19, but the inclusion of a “MARTIAL LAW” indicator certainly doesn’t help us shake the feeling we’ve all found ourselves in a proper dystopia.

For those who’d would rather get their information from the source rather than have it filtered through the media, we’ve recently covered a few APIs that will allow you to pull your own up-to-date COVID-19 stats. Whether you’re looking to build something as elaborate as this display, or just want to echo it out to the terminal, making sure you’re seeing accurate data is key to identifying the turning point.

Continue reading “Global Status Board Keeps Eye On COVID-19 Situation”

Stay Informed: How To Pull Your Own COVID-19 Data

For all the technology we have, it can still be frustratingly difficult to get any concrete information from the media. Sometimes all you want to do is to cut through the noise and see some real numbers. Watching talking heads argue for a half hour probably isn’t going to tell you much about how the COVID-19 virus is spreading through your local community, but seeing real-time data pulled from multiple vetted sources might.

Having access to the raw data about COVID-19 cases, fatalities, and recoveries is, to put it mildly, eye-opening. Even if day to day life seems pretty much unchanged in your corner of the world, seeing the rate at which these numbers are climbing really puts the fight into perspective. You might be less inclined to go out for a leisurely stroll if you knew how many new cases had popped up in your neck of the woods during the last 24 hours.

But this article isn’t about telling you how to feel about the data, it’s about how you can get your hands on it. What you do with it after that is entirely up to you. Depending on where you live, the numbers you see might even make you feel a bit better. It’s information on your own terms, and in these uncertain times, that might be the best we can hope for.

Continue reading “Stay Informed: How To Pull Your Own COVID-19 Data”

Write Once, Run Everywhere: Cross-Platform Programming Done Right

One of the goals of programming languages back in the 1950s was to create a way to write assembly language concepts in an abstract, high-level manner. This would allow the same code to be used across the wildly different system architectures of that era and subsequent decades, requiring only a translator unit (compiler) that would transform the source code into the machine instructions for the target architecture.

Other languages, like BASIC, would use a runtime that provided an even more abstract view of the underlying hardware, yet at the cost of a lot of performance. Although the era of 8-bit home computers is long behind us, the topic of cross-platform development is still highly relevant today, whether one talks about desktop, embedded or server development. Or all of them at the same time.

Let’s take a look at the cross-platform landscape today, shall we?

Continue reading “Write Once, Run Everywhere: Cross-Platform Programming Done Right”

Counter-Strike Gets The RGB LED Treatment

Inspired by the over-the-top stage lighting and pyrotechnics used during e-sport events, [Hans Peter] set out to develop a scaled-down version (minus the flames) for his personal Counter-Strike: Global Offensive sessions. It might seem like pulling something like this off would involve hacking the game engine, but as it turns out, Valve was kind enough to implement a game state API that made it relatively easy.

According to the documentation, the CS:GO client can be configured to send out state information to a HTTP server at regular intervals. It even provided example code for implementing a simple state server in Node.js, which [Hans] adapted for this project by adding some conditional statements that analyze the status of the current game.

These functions fire off serial commands to the attached Arduino, which in turn controls the WS2812B LEDs. The Arduino code takes the information provided by the HTTP server and breaks that down into various lighting routines for different conditions such as wins and losses. But things really kick into gear when a bomb is active.

[Hans] wanted to synchronize the flashing LEDs with the beeping sound the bomb makes in the game, but the API doesn’t provide granular enough data. So he recorded the audio of the bomb arming sequence, used Audacity to precisely time the beeps, and implemented the sequence in his Arduino code. In the video after the break you can see that the synchronization isn’t perfect, but it’s certainly close enough to get the point across in the heat of battle.

With the special place that Counter-Strike occupies in the hearts of hackers and gamers alike, it’s little surprise people are still finding unique ways to experience the game.

Continue reading “Counter-Strike Gets The RGB LED Treatment”

A Web API For Your Pi

There are many ways to attach a project to the Internet, and a plethora of Internet-based services that can handle talking to hardware. But probably the most ubiquitous of Internet protocols for the average Joe or Jane is the web browser, and one of the most accessible of programming environments lies within it. If only somebody with a bit of HTML and Javascript could reach a GPIO pin on their Raspberry Pi!

If that’s your wish, then help could be at hand in the form of [Victor Ribeiro]’s RPiAPI. As its name suggests, it’s an API for your Raspberry Pi, and in particular it provides a simple web-accessible endpoint wrapper for the Pi’s GPIO library from which its expansion port pins can be accessed. By crafting a simple path on the address of the Pi’s web server each pin can be read or written to, which while it’s neither the fastest or most accomplished hardware interface for the platform, could make it one of the easiest to access.

Security comes courtesy of Apache password protected directories via .htaccess files, so users would be well-advised to consider the implications of connecting this to a public IP address very carefully. But for non experts in security it still has the potential to make a very useful tool in the armoury of ways to control hardware from the little single board computer. It’s not the first try at this idea as we’ve seen a PHP example early in the Pi’s lifetime as well as one relying upon MySQL, but it does seem to be a simpler option than the others.

Micropython And C Play Together Better

Python is a versatile, powerful language but sometimes it’s not the best choice, especially if you’re doing work in embedded systems with limited memory. Sometimes you can get away with MicroPython for these cases, but the best language is likely C or assembly. If you’re really stubborn, like [amirgon], and really want C and Python to play well together, you can make use of his new tool which can bring any C library to MicroPython.

As an example of how this tool is used, a “Pure MicroPython” display driver for ILI9341 on the ESP32, which means that everything was implemented in MicroPython. [amirgon] wanted to see how the Python driver would compare to one that’s already been written in C, and use it to showcase MicroPython binding. This tool also automatically converts structs, unions, enums and arrays to Python objects, and provides a means to work with pointers which is something that Python doesn’t handle in the same way that C requires.

[amirgon] hopes that this tool will encourage the adoption of Micropython by removing the obstacle of missing APIs and libraries in MicroPython. Since most libraries for systems like these are written in C, a way to implement them in Python is certainly powerful. We featured one use case for this a while back, but this is a much more generic fix for this coding obstacle.

Ask Hackaday: How Would You Build This Flight Tracker For Kids?

You’ve got to hand it to marketers – they really know how to make you want something. All it takes is a little parental guilt, a bit of technical magic, and bam, you’re locked into a product you never knew you needed.

This prototype flight tracking nightlight for kids is a great example. Currently under development by Canadian airline WestJet, the idea is to provide a way for traveling parents to let kids know how long it is until Mommy or Daddy gets home from their trip. The prototype shows a stylized jet airliner with Neopixel lighting in the base. A pair of projectors in the wings shine an animated flight path on the child’s darkened bedroom ceiling, showing them when the wayward parent will return. Get past the schmaltz in the video below, and perhaps get over your jealousy of parents with kids who still eagerly await their return, and it’s actually a pretty good idea.

Now for the ask: how would you go about building something like this? And more importantly, how would you make it work for any plane, train, or automobile trip, and not just a WestJet flight? A look at the “How it will work” section of the page shows several photos of the prototype, which suggests the hardware end is dead easy. A Raspberry Pi Zero W features prominently, and the projectors appear to be TI’s DLP2000EVM, which we’ve featured before, mounted to a riser card. The Neopixels, a 3D-printed case, and the superfluous flashlight fuselage would be pretty easy, too.

On the software side, a generic version that tracks flight from any airline would need an interface for the traveler to define a flight, and something to check an API like FlightAware’s, or similar ones for whatever mode of transportation you’re using.

Seems like a pretty straightforward project. WestJet claims they’ll have their Flight Light ready sometime this summer; think we can beat them to it?

Continue reading “Ask Hackaday: How Would You Build This Flight Tracker For Kids?”