Rust-y Firmware For Waveshare Smartwatch

Waveshare makes a nifty little ESP32-S3 based smartwatch product, but its firmware is apparently not to everyone’s liking. Specifically, it’s not to [infiniton] a.k.a [Bright_Warning_8406]’s liking, as they rewrote the entire code base in Rust. No_std Rust, to be specific, but perhaps that doesn’t need to be specified when dealing with ESP32.

On the Reddit thread about the project, he lists some of the advantages. For one thing, the size of the binary has dropped from 1.2 MB to 579 kB while maintaining the same functionality. More interesting is that he’s been able to eliminate polling entirely: the firmware is purely event-driven. The CPU is not just idle but parked until a timer or GPIO event wakes it up. For this form factor, that’s a big deal — you can’t fit a very large battery in a watch, after all.

Getting drivers for the AMOLED display, touch sensor, audio, and RTC modules written from scratch is an impressive accomplishment. Apparently the screen driver in particular was “a nightmare” and we believe it. There’s a reason most people go for existing libraries for this stuff. [Bright_Warning] did not post screenshots or video, but claims his version of the watch watch can make HTTP calls to Smart Home, play MP3s, play the old phone games– Snake, 2048, Tetris, Flappy Bird, Maze– and even comes with a T9 keyboard for text input.

If you’re looking to get closer to bare metal, and don’t mind it being Rust-y, take a look at the code on GitHub in the first link above. This author isn’t enough of a rustacean to say if the code is as good as it sounds at a glance, but nothing egregious jumps out. The documentation describing exactly what’s going on under the hood isn’t half-bad, either. If you aren’t into Waveshare products, you could easily adapt this code into a more DIY ESP32 watch, too.

If you’re not into Rust, uh… washing soda and electric current can get it off of steel, and probably microcontrollers too. We can’t say that the chip will work after that, but hey — no rust.

The omatraumatone. Or something. It's a synth.

Otamatone Hacked Into Different, Cooler Synth: Trautonium

Analog synths are fun because they combine music, which all humans seem hard-wired to enjoy in one form or another, and electronics, which… uh, this is Hackaday. If you don’t like electronics, we’re not sure what to tell you. This hack from [Sound Workshop] takes the cheap, toy-like Otamatone and turns it into an older and more capable type of synthesizer: a Trautonium. The video below also includes a dive into the different types of early synthesizers, with examples of them playing, so it’s worth watching for that alone — if you know the history, skip the first five minutes or so.

For those of you more into the electronics than the music side of things, the Otamatone is kind of like an electronic slide whistle, but adorable. Shaped like an eighth note or a tadpole, you control pitch by sliding your fingers up and down the ‘tail’ and activate the voice by squeezing the ‘head’ to open the mouth. It is one of the newest electronic instruments on the market, having debuted as a Japanese toy in 2009.

Continue reading “Otamatone Hacked Into Different, Cooler Synth: Trautonium”

Variable-Pitch Propellers For More Efficient Quadcopter

Quadcopters tend to have very poor efficency because of their high disk loading. High disk loading– that is, how much weight each square meter of area swept by the propellers must carry–is almost unavoidable with conventinal quadcopters, which are controlled by throttling the four props. Make the propellers too big, and their inertia slows down that control loop, leading to stability problems. [rctestflight] had an idea to solve this, by borrowing a technology from the world of fixed-wing aviation: variable-pitch propellers.

In aircraft use, they are not new, dating back to the end of the first world war. They’re made for everything from the largest turboprops to the  75 kW(100 HP) Rotax 912. By varying the propeller pitch, you can keep the engine turning in its ideal RPM range but still vary thrust by taking a larger or shallower ‘bite’ out of the air with each sweep of the prop. You can probably see how this applies to the quadcopter: a well-designed pitch-change mechanism is going to be much quicker than throttling a big prop with lots of rotational inertia. That’s the theory.

To test it, [rctestflight] builds some large 3D-printed variable pitch props, hooks them up to regular drone motors via a belt drive, before going on–you guessed it–an RC test flight. To make that work, he’s got the pitch servo being driven from what should be the flight controller’s thrust output to each motor. Aside from the vibrations from imperfect balance on the 3D-printed props, it flies quite well– and much better with pitch control than trying to vary the RPMs of those heavy props. He’s even able to reverse the propeller pitch, making this perhaps the first quadcopter capable of autorotation. Well, almost, given that it lost control and came apart when he cut the throttle.

Continue reading “Variable-Pitch Propellers For More Efficient Quadcopter”

an animated gif of the eye in motion.

Bending Faux-Neon LEDs Make For Animations Glass Tubes Can’t Match

Odds are, if you like neon lights, you’re not thrilled with the LED faux-“neon” strips that are supposed to replace them. They’ve got their advantages, but the light quality of RGB LEDs lacks something compared to the emission spectrum of nobel gas, at least to purists. On the other hand, you cannot create an animation by bending glass tubes, like [David Hamp-Gonsalves] has demonstrated with his Neon Animated Eye.

Back in the day, you’d have needed dozens of tubes for a flickery animation, but [David] figured that since these LED strips are flexible, why not flex them? He’s using addressable LEDs — WS2812s, specifically — so activating and deactivating the pupil of the eye is easy-peasy. Opening and closing the lid is accomplished with a geared motor driven by a TB6612 driver turning a barrel cam. The ends of the stiff LED strip being brought together and pulled apart result in the blinking effect here, but as [David] points out you’re hardly limited that specific motion. There’s a whole world of Tron-like glowing animatronics that can be created with this technique. Code and STLs are available on GitHub, though, if you want to replicate the eye exactly.

[David] says he’d like to see this in a storefront someday, but given that fatigue life is a thing, it might be something to keep in your back pocket for seasonal displays like Christmas and Halloween rather than something that’s going to run 24/7. On the other hand, if you’re careful about limiting flexion and which faux-neon strip you buy, you might be able to create an animation that can last for years.

This is hardly the first time we’ve seen these faux-neon strips , but it is the first time we’ve seen them animated. We can’t help but think the Hauntimator software we featured before would be a good paring with this hack.

Are We Surrendering Our Thinking To Machines?

“Once, men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.” — so said [Frank Herbert] in his magnum opus, Dune, or rather in the OC Bible that made up part of the book’s rich worldbuilding. A recent study demonstrating “cognitive surrender” in large language model (LLM) users, as reported in Ars Technica, is going to add more fuel to that Butlerian fire.

Cognitive surrender is, in short, exactly what [Herbert] was warning of: giving over your thinking to machines. In the study, people were asked a series of questions, and — except for the necessary “brain-only” control group — given access to a rigged LLM to help them answer. It was rigged in that it would give wrong answers 50% of the time, which while higher than most LLMs, only a difference in degree, not in kind. Hallucination is unavoidable; here it was just made controllably frequent for the sake of the study.

The hallucinations in the study were errors that the participants should have been able to see through, if they’d thought about the answers. Eighty percent of the time, they did not. That is to say: presented with an obviously wrong answer from the machine, only in 20% of cases did the participants bother to question it. The remainder were experiencing what the researchers dubbed “cognitive surrender”: they turned their thinking over to the machines. There’s a lot more meat to this than we can summarize here, of course, but the whole paper is available free for your perusal.

Giving over thinking to machines is nothing new, of course; it’s probably been a couple decades since the first person drove into a lake on faulty GPS directions, for example. One might even argue that since LLMs are correct much more than 50% of the time, it is statistically wise to listen to them. In that case, however, one might be encouraged to read Dune.

Thanks to [Monika] for the tip!

TinyGo Boldly Goes Where No Go Ever Did Go Before

When you’re programming microcontrollers, you’re likely to think in C if you’re old-school, Rust if you’re trendy, or Python if you want it done quick and have resources to spare. What about Go? The programming language, not the game. That’s an option, too, with TinyGo now supporting over 100 different dev boards, along with webASM.

We covered TinyGo back in 2019, but they were just getting started at that point, targeting the Arduino and BBC:micro boards. They’ve grown that list to include everything from most of Adafruit’s fruitful suite of offerings, ESP32s, and even the Nintendo Game Boy Advance. So now you can go program go in Go so you can play go on the go.

The biggest drawback–which is going to be an absolute dealkiller for a lot of applications–is a lack of wireless connectivity support. Claiming to support the ESP8266 while not allowing one to use wifi is a bit of a stretch, considering that’s the whole raison d’être of that particular chip, but it’s usable as a regular microcontroller at least.

They’ve now implemented garbage collection, a selling point for those who like Go, but admit it’s slower in TinyGo compared to its larger cousin and won’t work on AVR chips or in WebAssembly. It’s still not complete Go, however, so just as we reported in 2019, you won’t be able to compile all the standard library packages you might be used to. There are more of them than there were, so progress has been made!

Still, knowing how people get about programming languages, this will please the Go fanatics out there. Others might prefer to go FORTH and program their Arduinos, or to wear out their parentheses keys with LISP. The more the merrier, we say!

The Heat Island Effect Is Warming Up The AI Data Center Controversy

There’s been a lot of virtual ink spilled in environmental circles about the cooling water requirements of data centers, but less consideration of what happens with all the heat coming out of these buildings. Naturally, it’s going to warm the surrounding environment, but how much? Around 2 C (3.6 F) on average, and potentially much more than that, according to a recent study on the data heat island effect.

It’s common sense, of course: heat removed from the data center doesn’t go away. That heat might go into a body of water if one is available, but otherwise it’s out into the atmosphere to warm up everybody else’s day. In some places — like a Canadian winter — that might not be so bad. In others, where climate change and urban heat islands are cranking up the summertime temperatures, it very much could be. Especially if you’re in the worst-case scenario micro-climate described by the paper, which saw a predicted increase of 9.1 C (16 F).

Now, these results are theoretical and need to be ground-truthed, but anyone who has huddled next to the air-exchange unit of a large building for warmth knows there’s something to them. Unfortunately there don’t seem to be before-and-after measurements available for existing data-centers — AI or otherwise — to show exactly what their heat output is doing in the real world, but the urban heat island effect from all the dark asphalt in our cities is well known. Cooling paint and green roofs can help with that, but they won’t do much for the megawatts being pumped out to keep your cousin’s AI girlfriend online.

Some would argue that all this heat wouldn’t be a problem if we could launch the data centers outside the environment — just have a care the front doesn’t fall off.


Image of data center cooling by Анна from Pixabay