video of someone pushing the button to generate new art

AI Generating Paintings Off To A Flying Art

The philosophical question of “What is art?” has an ethereal, transient quality to it. A definition seems to slip away as you get close to an answer. Embracing that quality, [Max Fischer] has created an AI-powered painting that paints a new piece of art at the push of a button. When the button below the screen is pushed, a new image is generated and the old one is forever lost, which in a way, makes the frame a piece of art itself.

The really makes this project stand is the sheer quality of documentation on the GitHub repo. The instructions are incredibly detailed. Everything from setting up the Jetson to building the control box out of half-inch MDF (12mm for the sane part of the world) is laid out with copious pictures. Despite the ease of generating images ahead of time, [Max] took the hard route Hackaday route and did all inference locally and in real-time. To handle the processing requirements, an Nvidia Jetson Xavier NX single-board computer was used. He trained StyleGAN with high-resolution abstract art that gets generated whenever the button below the screen is pushed. To prevent screen burn-in, a PIR was added to turn the screen off when no one is around.

Here at Hackaday, we’ve seen several projects putting old laptop screens or monitors into a nice wooden case and mounting them to the wall. Since 32″ laptops are rather hard to find, [Max] opted to take a different approach and instead got a 32″ Samsung Frame for relatively cheap.

For all their detail, [Max] did leave one thing out of the readme: the AI that generates the art. [Max] hints that he wants others to create their picture frames, but with their own art generation. So what are you waiting for? Go make some art.

SQLite On The Web: Absurd-sql

Love it or hate it, the capabilities of your modern web browser continuously grow in strange and wild ways. The ability for web apps to work offline requires a persistent local storage solution and for many, IndexedDB is the only choice as it works across most browsers and provides a database-like interface. However, as [James Long] found, IndexedDB is painfully slow on chrome and limited in querying ability. He set out to bring a tool he was familiar with, SQLite, and bring it to the web browser as absurd-sql.

Why absurd? Partially because most browsers (not chrome) implement IndexedDB on top of SQLite. So for many browsers, it is just SQLite on top of IndexedDB on top of SQLite. Luckily for [James] there already was a project known as sql.js that uses emscripten to compile the C-based SQLite into WebAssembly. However, sql.js uses an in-memory storage backing and all data is lost when refreshing the page. [James] tweaked SQLite’s method of reading and writing blocks. Instead of being memory backed, he added a layer to read and write blocks from IndexedDB. This means that only sections of the database need to be read in, bringing in huge performance gains.

a graph showing absurd-sql beating IndexDB on every benchmarkThat brings us to the other reason why it’s absurd. On chrome (as well as Firefox), absurd-sql beats IndexedDB on almost every benchmark. A query like SELECT SUM(*) FROM kv led to stunning results.

So what’s the downside? Other than a somewhat large WebAssembly file that needs to get downloaded (409KB) and cached, there really isn’t. Of course, it’s not all roses when it comes to web development. Native SQLite runs 2-3 times faster than absurd-sql, which demonstrates how slow IndexedDB really is.

There are other storage standards on the horizon for web browsers, but locking becomes an issue. SQLite expects synchronous reads and writes because it’s just simple C. IndexedDB and other storage solutions are asynchronous as the event loop of Javascript lends itself well to that model. Absurd-sql gets around that by creating a SharedArrayBuffer that is shared with a worker process. The atomics API is used to communicate with the buffer. In particular, atomics.wait() allows the worker to block main thread execution until the read or write has finished. From the perspective of SQLite, the operations are synchronous. IndexedDB provides transactions so multiple connections can happen (for example multiple tabs open). Multiple readonly transactions can occur in parallel but only one readwrite transaction can be in flight.

Why not pull up your browser and start playing around with it? You’re already doomed to learn WebAssembly anyway.

two hands holding a wider version of a purple gameboy advance

The Stretch Limo Of Game Boys

Here at Hackaday, we see all sorts of projects, some born out of a deep necessity or itch that couldn’t be scratched. Others are born out of a world of “why not” and it is perhaps these projects that put the biggest smile on our faces. The WideBoy Advance by [Elliot] of Retro Future is one such project.

Starting with a working Game Boy Advance and a donor one with a busted motherboard, the frankenstein-ification could start. A Dremel split one case in half and removed the sides on another, while trusty old car body filler helps fill and smooth the gaps. A particularly clever trick is to use the Dremel to create channels for the filler to adhere easier. Several areas had to be built up with filler and glued in bits of plastic as a base. As you can see in the video below, the countless hours of sanding, priming, sanding, and more priming led to a beautifully smooth finish. The choice of purple paint really sells the impression of a factory-fresh Game Boy Advance.

The working circuit board was desoldered and the donor board was cut into pieces to fit in the extended sides. Using some magnet wire, connections were bridged over to the original motherboard via the test points on the PCB. [Elliot] didn’t opt to swap the screen to an IPS display or add a backlight. These quality of life improvements are nice, but a dead giveaway that Nintendo didn’t make it. The goal is to get the user to wonder, even if just for a second, what if Nintendo just happened to make this wide one-off handheld console.

[Elliot] made it simply because he found it interesting and enjoyed the form of the thing he made. Is it a hack? Is it art? Probably a little bit of both. This isn’t his first modified Nintendo handheld either. He previously made a long Nintendo Gameboy DMG-01. We love seeing all the wild hacks and tweaks made to Game Boy line, such as this Game Boy Color inside the DMG-01.

Continue reading “The Stretch Limo Of Game Boys”

Neuromorphic Computing: What Is It And Where Are We At?

For the last hundred or so years, collectively as humanity, we’ve been dreaming, thinking, writing, singing, and producing movies about a machine that could think, reason, and be intelligent in a similar way to us. The stories beginning with “Erewhon” published in 1872 by Sam Butler, Edgar Allan Poe’s “Maelzel’s Chess Player,” and the 1927 film “Metropolis” showed the idea that a machine could think and reason like a person. Not in magic or fantastical way. They drew from the automata of ancient Greece and Egypt and combined notions of philosophers such as Aristotle, Ramon Llull, Hobbes, and thousands of others.

Their notions of the human mind led them to believe that all rational thought could be expressed as algebra or logic. Later the arrival of circuits, computers, and Moore’s law led to continual speculation that human-level intelligence was just around the corner. Some have heralded it as the savior of humanity, where others portray a calamity as a second intelligent entity rises to crush the first (humans).

The flame of computerized artificial intelligence has brightly burned a few times before, such as in the 1950s, 1980s, and 2010s. Unfortunately, both prior AI booms have been followed by an “AI winter” that falls out of fashion for failing to deliver on expectations. This winter is often blamed on a lack of computer power, inadequate understanding of the brain, or hype and over-speculation. In the midst of our current AI summer, most AI researchers focus on using the steadily increasing computer power available to increase the depth of their neural nets. Despite their name, neural nets are inspired by the neurons in the brain and share only surface-level similarities.

Some researchers believe that human-level general intelligence can be achieved by simply adding more and more layers to these simplified convolutional systems fed by an ever-increasing trove of data. This point is backed up by the incredible things these networks can produce, and it gets a little better every year. However, despite what wonders deep neural nets produce, they still specialize and excel at just one thing. A superhuman Atari playing AI cannot make music or think about weather patterns without a human adding those capabilities. Furthermore, the quality of the input data dramatically impacts the quality of the net, and the ability to make an inference is limited, producing disappointing results in some domains. Some think that recurrent neural nets will never gain the sort of general intelligence and flexibility that our brains offer.

However, some researchers are trying to creating something more brainlike by, you guessed it, more closely emulates a brain. Given that we are in a golden age of computer architecture, now seems the time to create new hardware. This type of hardware is known as Neuromorphic hardware.

Continue reading “Neuromorphic Computing: What Is It And Where Are We At?”

Raspberry Pi Powered Standing Desk Rises To New Heights

Like many office workers, [David Kong] found himself the lucky recipient of a motorized sit-stand desk. Also like most office workers with such a desk, he found himself mostly sitting. Reminders on his phone did little to change habits and [David] resolved to automate his desk to rise on a schedule.

the control board for a poppin sit stand desk

Taking off the front panel of the control box required a few screws and [David] was delighted to find some testing pins right on the PCB.By connecting the right pins together, he could simulate any button being pressed. A Toshiba TLP222A solid-state relay made it simple to connect the pins together, the next step was triggering the relay on some sort of timer.

Speaking of timers, the oft-lauded 555 timer was considered. However, the length of time desired wasn’t as well suited for the 555, and the appeal of just tweaking a file to adjust the interval was tempting. Going to the other end of the spectrum, [David] had a Raspberry Pi zero laying around he had been meaning to play with.

After soldering the relay to pin 17 and writing a quick 10 line python script that is executed on startup, [David] had a working solution that could be taped to the underside of the desk, out of sight. Rather than being on a fixed timer, the desk raises every 45 to 60 minutes. The impact on his life has been wonderful, which was the goal of this particular project. It’s been a few months and he hasn’t had to tweak or fix anything. Is a whole 64-bit multicore processor a bit of an overkill for toggling a pin every hour or so? Yes. But we can’t really fault him for reaching for what was already lying around. The results speak for themselves.

Perhaps this would be something you would incorporate when you’re building your own standing desk?

Tamagotchis Everywhere

Tamagotchi’s relatively simple technical complexity pales in comparison to its huge cultural impact, with over 76 million sold. It has spawned comics, stories, numerous toys, and offshoots such as an anime and two films. [JC] was looking through some of his old stuff and came across a Tamagotchi P1 (the original Tamagotchi) and decided to create a portable emulator for it. The ROM for the P1 has long been dumped and can be run within a MAME emulator. After all, it’s just an E0C6S46 Epson MCU, 32×16 LCD with 8 additional icons, three buttons, and a piezo. The manual for the MCU is even available on Epson’s website. Here at Hackaday, we’ve seen Tamagotchis many times before, such as the infinite matrix of the Tamagotchi Singularity and a ROM dump of the latest generation of Tamagotchi based on a 6502 core.

So what’s different about what [JC] is trying to accomplish? For starters, the tooling. It is divided into two parts: TamaLIB and TamaTool. The first is a hardware-agnostic P1 emulation library that relies on a HAL layer to communicate with the hardware. The second is a frontend for the first, allowing debugging, RAM editing, and modifications to the ROM. In particular, it supports easy modification of images within the ROM and allows for custom eggs and Tamagotchis. The homage to the Jolly Wrencher is nice.

Given that the emulation is platform-agnostic and access to a low-resolution timer is not guaranteed, cycle counts become tricky. The rather clever solution [JC] stumbled upon was synchronizing against input polling, screen updates, and sound output. TamaLIb keeps track of how many CPU cycles have passed and regularly checks if the emulation is going too fast or too slow. Slowing down or speeding up the simulation allows it to seem to run in real-time.

The last goal [JC] had was to run it on embedded hardware. Using an STM32F072 board and a cheap OLED screen had a portable emulated Tamagotchi known as MCUGotchi. The code is available on GitHub and should work on most STM32 MCUs with a few small tweaks. Now that someone has gone through the effort to make it easy to run a Tamagotchi literally anywhere, it might not be long until we see a coffee maker or a smart light acting as a Tamagotchi. Perhaps the new joke will be, can it run Tamagotchi?

Video after the break.

Continue reading “Tamagotchis Everywhere”

Building A Solar Powered Game Boy Pocket

Light has always been a key part of the classic Game Boy experience. Some of us have fond memories of riding along in the back seat of a car at night, pausing and unpausing the game as the street lights overhead briefly give enough light to see the unlit display. The availability of third party IPS displays for these classic handhelds has largely eradicated this problem today, but as you might expect, the increased power requirements of the more modern screen reduces the system’s runtime.

Installing the USB-C charge controller.

As part of their examination into energy production, the [Houston Museum of Natural Science] set out to see if they could improve things by adding a solar panel to the back of a Game Boy Pocket that had already been modified with an IPS display. The Pocket version of the Game Boy was selected as it has a nice flat back that made it easy to attach a solar panel, and in fact the panel sourced for this mod is so well dimensioned, it almost looks like the device came that way.

In the video below, you can see the modification starts by cutting away a large section of the Game Boy’s rear panel to fit the 1000 mAh LiPo battery. The solar panel is then affixed over the back with super glue. A diode is soldered onto the solar cell, and then wired into a charge controller that came with USB-C input. The placement of the charge controller ended up being trickier than expected, but with a little hot glue, it works just fine. Overall this is a simple mod but a brilliant idea.

This isn’t the first solar-powered handheld game system we’ve seen, but it’s nice to see the idea revisited and expanded on, particularly regarding ergonomics. In addition, we love the incredible detail of narration that’s given as this hack slowly takes shape. Video after the break.

Continue reading “Building A Solar Powered Game Boy Pocket”