Modifying A QingPing Air Quality Monitor For Local MQTT Access

The QingPing Air Quality Monitor 2 is an Android-based device that not only features a touch screen with the current air quality statistics of the room, but also includes an MQTT interface that normally is used in combination with the QingPing mobile app and the Xiaomi IoT ecosystem. Changing it to report to a local MQTT server instead for integration with e.g. Home Assistant can be done in an official way that still requires creating a cloud account, or you can just do it yourself via an ADB shell and some file modifications as [ea] has done.

By default these devices do not enumerate when you connect a computer to their USB-C port, but that’s easily resolved by enabling Android’s developer mode. This involves seven taps on the Device Name line in the About section of settings. After this you can enter Developer Options to toggle on Debug Mode and Adbd Debugging, which creates the option to connect to the device via USB with ADB and open up a shell with adb shell.

From there you can shoot off the QingSnow2 app and the watchdog.sh that’s running in the background, disable IPv6 and edit /etc/host to redirect all the standard cloud server calls to a local server. Apparently there is even SSH access at this point, with root access and password rockchip. The MQTT configuration is found under /data/etc/ in settings.ini, which is used by the QingPing app, so editing redirects all that.

Of course, the device also queries a remote server for weather data for your location, so if you modify this you have to provide a proxy, which [ea] did with a simple MQTT server that’s found along with other files on the GitHub project page.

Ray Marching In Excel

3D graphics are made up of little more then very complicated math. With enough time, you could probably compute a ray marching by hand. Or, you could set up Excel to do it for you!

Ray marching is a form of ray tracing, where a ray is stepped along based on how close it is to the nearest surface. By taking advantage of signed distance functions, such an algorithm can be quite effective, and in some instances much more efficient then traditional ray marching algorithms. But the fact that ray marching is so mathematically well defined is probably why [ExcelTABLE] used it to make a ray traced game in Excel.

Under the hood, the ray marching works by casting a ray out from the camera and measuring its distance from a set of three dimensional functions. If that distance is below a certain value, this is considered a surface hit. On surface hits, a simple normal shader computes pixel brightness. This is then rendered out by variable formatting in the cells of the spreadsheet.

For those of you following along at home, the tutorial should work just fine in any modern spreadsheet software including Google Sheets and LibreOffice Calc. It also provides a great explanation of the math and concepts of ray marching, so is worth a read regardless your opinions on Excel’s status as a so-called “programming language.”

This is not the first time we have come across a ray tracing tutorial. If computer graphics are your thing, make sure to check out this ray tracing in a weekend tutorial next!

Thanks [Niklas] for the tip!

A tab-based terminal window is shown, with the label “brow6l – Hackaday.” The Hackaday website is visible in the upper part of the terminal screen, and in the lower part is a text display containing information about the website and interface information.

Terminal-Based Web Browsing With Modern Conveniences

Programmers hold to a wide spectrum of positions on software complexity, from the rare command-line purists to the much more common web app developers, and the two extremes rarely meet. One point of contact, though, might be [Jan Antos]’s Brow6el, which uses sixel graphics to display a fully graphical web browser within a terminal.

Behind the scenes, the Chromium Embedded Framework renders webpages headless, then Brow6el uses libsixel to convert the rendered output image to sixels, a simple kind of console-based graphics representation, which it then outputs to the terminal. It regularly re-renders the page to catch page updates and display them in real time, and it can send mouse or keyboard input back to the webpage. For more advanced work, it also has a JavaScript development console, and it’s possibly to manually inject scripts into rendered webpages, or inject them automatically using URL match patterns. Continue reading “Terminal-Based Web Browsing With Modern Conveniences”

Interconnected circuits for controlling the clock

Tick, Tock, Train Station Clock

We’ve seen a few H-bridge circuits around these parts before, and here’s another application. This time we have an Old Train Station Clock which has been refurbished after being picked up for cheap at the flea market. These are big analog clocks which used to be common at railway stations around the world.

This build uses an ESP32 C3-mini microcontroller (PDF) in combination with an A4988 Microstepping Motor Driver (PDF). The logic is handled with MicroPython code. The A4988 provides two H-bridge circuits, one for each of two stepper motors, only one of which is used in this build.

The controller for this clock needs to send an alternating positive then negative DC pulse every minute to register that a minute has passed so the clock can update its hour hand and minute hand as appropriate. The ESP32 and the A4988 H-bridge cooperate to make that happen. The wifi on the ESP32 C3-mini is put to good use by facilitating the fetching of the current time from the internet. On an hourly basis the clock gets the current time with a HTTP call to a time server API, for whatever is suitable for your time zone.

Thanks to [PiotrTopa] for writing in to let us know about his project. If you’re interested in learning more about H-bridge applications be sure to check out Introduction To The H-bridge Motor Controller and A H-Bridge Motor Controller Tutorial Makes It Simple To Understand.

Debugging The AMD GPU

Although Robert F. Kennedy gets the credit for popularizing it, George Bernard Shaw said: “Some men see things as they are and say, ‘Why?’ I dream of things that never were and say, ‘Why not?'” Well, [Hadz] didn’t wonder why there weren’t many GPU debuggers. Instead, [Hadz] decided to create one.

It wasn’t the first; he found some blog posts by [Marcell Kiss] that helped, and that led to a series of experiments you’ll enjoy reading about. Plus, don’t miss the video below that shows off a live demo.

It seems that if you don’t have an AMD GPU, this may not be directly useful. But it is still a fascinating peek under the covers of a modern graphics card. Ever wonder how to interact with a video card without using something like Vulkan? This post will tell you how.

Writing a debugger is usually a tricky business anyway. Working with the strange GPU architecture makes it even stranger. Traps let you gain control, but implementing features like breakpoints and single-stepping isn’t simple.

We’ve used things like CUDA and OpenCL, but we haven’t been this far down in the weeds. At least, not yet. CUDA, of course, is specific to NVIDIA cards, isn’t it?

Continue reading “Debugging The AMD GPU”

Mentra Brings Open Smart Glasses OS With Cross-Compat

There are a few very different pathways to building a product, and we gotta applaud the developers taking care to take the open-source path. Today’s highlight is [Mentra], who is releasing an open-source smart glasses OS for their own and others’ devices, letting you develop your smart glasses ideas just once, a single codebase applicable for multiple models.

Currently, the compatibility list covers four models, two of them Mentra’s (Live and Mach 1), one from Vuzix (Z100), and one from Even Realities (G1) — some display-only, and some recording-only. The app store already has a few apps that cover the basics, the repository looks lively, and if the openness is anything to go by, our guess is that we’re sure to see more.

Continue reading “Mentra Brings Open Smart Glasses OS With Cross-Compat”

Iteration3D Is Parametric Python In The Cloud

It’s happened to all of us: you find the perfect model for your needs — a bracket, a box, a cable clip, but it only comes in STL, and doesn’t quite fit. That problem will never happen if you’re using Iteration3D to get your models, because every single thing on the site is fully-parametric, thanks to an open-source toolchain leveraging 123Dbuilds and Blender.

Blender gives you preview renderings, including colors where the models are set up for multi-material printing. Build123D is the CAD behind the curtain — if you haven’t heard of it, think OpenSCAD but in Python, but with chamfers and fillets. It actually leverages the same OpenCascade that’s behind everyone’s other favorite open-source CAD suite, FreeCAD. Anything you can do in FreeCAD, you can do in Build123D, but with code. Except you don’t need to learn the code if the model is on Iteration3D; you just set the parameters and push a button to get an STL of your exact specifications.

The downside is that, as of now, you are limited to the hard-coded templates provided by Iteration3D. You can modify their parameters to get the configuration and dimensions you need, but not the pythonic Build123D script that generates them. Nor can you currently upload your own models to be shared and parametrically altered, like Thingiverse had with their OpenSCAD-based customizer. That said, we were told that user-uploads are in the pipeline, which is great news and may well turn Iteration3D into our new favorite.

Right now, if you’re looking for a box or a pipe hanger or a bracket, plugging your numbers into Iteration3D’s model generator is going to be a lot faster than rolling your own, weather that rolling be done in OpenSCAD, FreeCAD, or one of those bits of software people insist on paying for. There’s a good variety of templates — 18 so far — so it’s worth checking out. Iteration3D is still new, having started in early 2025, so we will watch their career with great interest.

Going back to the problem in the introduction, if Iteration3D doesn’t have what you need and you still have an STL you need to change the dimensions of, we can help you with that. 

Thanks to [Sylvain] for the tip!