Illuminated smart curtain in front of a window, beside a Christmas tree

Smart LED Curtain Brings Sprites To Your Windows

Mobile interface for LED smart curtain display
A mobile interface is a nice touch

Anybody who has ever seen a video wall (and who hasn’t?) will be familiar with the idea of making large-scale illuminated images from individual coloured lights. But how many of us have gone the extra mile and fitted such a display in our own homes? [vcch] has done just that with his Deluxe Smart Curtain that can be controlled with a phone or laptop.

The display itself is made up of a series of Neopixel strips, hung in vertical lines in front of the window.  There is a wide gap between each strip, lending a ghostly translucent look to the images and allowing the primary purpose of the window to remain intact.

The brains of the system are hosted on a low-cost M5stack atom ESP32 device. The data lines for the LEDs are wired in a zig-zag up and down pattern from left to right, which the driver software maps to the rectangular images. However, the 5V power is applied to the strips in parallel to avoid voltage drops along the chain.

If you’d like to build your own smart curtain, Arduino sketch files and PHP for the mobile interface are included on the project page. Be sure to check out the brief video of what the neighbors will enjoy at night after the break.

If video walls are your kind of thing, then how about this one that uses Ping Pong Balls as diffusers? Continue reading “Smart LED Curtain Brings Sprites To Your Windows”

Simple Sprite Routines Ease Handheld Gaming DIY

Making your own handheld games is made much easier with [David Johnson-Davies’] simple sprite routines for the Adafruit PyBadge and PyGamer boards. Sprites can be thought of as small, fixed-size graphical objects that are drawn, erased, moved, and checked for collision with other screen elements.

xorSprite() plots an 8×8 sprite, moveSprite() moves a given sprite by one pixel without any flicker, and hitSprite() checks a sprite for collision with any screen elements in a given color. That is all it takes to implement a simple game, and [David] makes them easy to use, even providing a demo program in the form of the rolling ball maze shown here.

These routines work out-of-the-box with the PyBadge and PyGamer, but should be easy to adapt to any TFT display based on the ST7735 controller. The PyGamer is the board shown here, but you can see the PyBadge as it was used to create an MQTT-enabled conference badge.

If you really want to take a trip down the rabbit hole of sprite-based gaming graphics, you simply can’t miss hearing about the system [Sprite_TM] built into the FPGA Game Boy badge.

The Future Of Space Is Tiny

While recent commercial competition has dropped the cost of reaching orbit to a point that many would have deemed impossible just a decade ago, it’s still incredibly expensive. We’ve moved on from the days where space was solely the domain of world superpowers into an era where multi-billion dollar companies can join on on the fun, but the technological leaps required to reduce it much further are still largely relegated to the drawing board. For the time being, thing’s are as good as they’re going to get.

Starlink satellites ready for launch

If we can’t count on the per pound cost of an orbital launch to keep dropping over the next few years, the next best option would logically be to design spacecraft that are smaller and lighter. Thankfully, that part is fairly easy. The smartphone revolution means we can already pack an incredible amount sensors and processing power into something that can fit in the palm of your hand. But there’s a catch: the Tsiolkovsky rocket equation.

Often referred to as simply the “rocket equation”, it allows you to calculate (among other things) the ratio of a vehicle’s useful cargo to its total mass. For an orbital rocket, this figure is very small. Even with a modern launcher like the Falcon 9, the payload makes up less than 5% of the liftoff weight. In other words, the laws of physics demand that orbital rockets are huge.

Unfortunately, the cost of operating such a rocket doesn’t scale with how much mass it’s carrying. No matter how light the payload is, SpaceX is going to want around $60,000,000 USD to launch the Falcon 9. But what if you packed it full of dozens, or even hundreds, of smaller satellites? If they all belong to the same operator, then it’s an extremely cost-effective way to fly. On the other hand, if all those “passengers” belong to different groups that split the cost of the launch, each individual operator could be looking at a hundredfold price reduction.

SpaceX has already packed 60 of their small and light Starlink satellites into a single launch, but even those craft are massive compared to what other groups are working on. We’re seeing the dawn of a new era of spacecraft that are even smaller than CubeSats. These tiny spacecraft offer exciting new possibilities, but also introduce unique engineering challenges.

Continue reading “The Future Of Space Is Tiny”

New Game, Old Ways: Cramming An NES Game Into 40 KB

Why would anyone bother to create new content for a console system that’s staring down its 40th birthday? Perhaps just for the challenge of fitting a game into 40 kilobytes of storage.

That at least seems to be the motivation behind [Morphcat Games] pending release of Micro Mages, a new game for the Nintendo Entertainment System console that takes its inspiration from Super Mario Bros. The interesting bit here is how they managed to stuff so much content into so little space. The video below goes into great detail on that, and it’s a fascinating lesson in optimization. The game logic itself is coded in assembler, which of course is far more efficient than higher level languages. Even so, that took 32 kB of ROM, leaving a mere 8 kB for background elements and foreground sprites.

Through a combination of limited sprite size, tiling of smaller sprites to make larger characters, and reusing tiles by flipping them horizontally or vertically, an impressively complete palette of animated characters was developed. Background elements were similarly deconstructed and reused, resulting in a palette of tiles used to generate all the maps for the game that takes up just 60 bytes. Turning those into playable levels involves more mirroring and some horizontal shifting of tiles, and it looks like quite an engaging playfield.

Yes, there’s a Kickstarter for the game, but we’re mainly intrigued by what it takes to cram a playable game into so little space. Don’t get us wrong – we love the Retro Pie builds too, but seeing the tricks that early game developers relied upon to make things work really gets the creative juices flowing.

Continue reading “New Game, Old Ways: Cramming An NES Game Into 40 KB”

AI Bot Plays Castlevania So You Don’t Have To

We’re not allowed to have TV here in the Hackaday Wonder Bunker, but occasionally we’ll pool together the bandwidth credits they pay us in and gather ’round the old 3.5 inch TFT LCD to watch whatever Netflix assures us is 93% to our liking. That’s how we found out they’ve made a show based on, of all things, one of the Castlevania games for the NES. We wanted to play the game to understand the backstory, but since it hails from the era of gaming where primitive graphics had to be supplemented with soul-crushing difficulty, we didn’t get very far.

But thanks to a very impressive project developed by [Michael Birken] maybe we’ll have it all figured out by the time we’ve saved enough credits to watch Season 2 (no spoilers, please). The software, which he’s quick to point out is not an example of machine learning, is an attempt to condense his personal knowledge of how to play Castlevania into a plugin for the Nintaco NES emulator. The end result is CastlevaniaBot, which is capable of playing through the original Castlevania from start to finish without human intervention. You can even stop and start it at will, so it can play through the parts you don’t want to do yourself.

[Michael] started this project with a simple premise: if he could make a bot successfully navigate the many levels of Dracula’s castle, then getting it to kill a few monsters along the way should be easy enough. Accordingly, he spent a lot of time perfecting the path-finding for CastlevaniaBot, which included manually playing through the entire game in order to get an accurate map of the background images. These images were then analyzed to identify things like walls and stairs, so the bot would know where it could and couldn’t move protagonist Simon Belmont. No matter what the bot is doing during the game it always considers where it is and where it needs to be going, as there’s a time limit for each stage to contend with. Continue reading “AI Bot Plays Castlevania So You Don’t Have To”

Friday Hack Chat: Everything About The ESP

When the ESP-8266 first arrived, it was a marvel. For two dollars, you could buy a simple module that could serve as a bridge between WiFi networks and microcontroller projects. It understood the Hayes command set, it didn’t use much power, and, as noted before, it only cost two dollars. The idea of cheap and accessible Internet of Things things was right there for the taking.

Then hackers figured out what was actually going on inside the ESP-8266. It was a full-blown microcontroller. There was Lua stuff you could put on it. You could program it with the Arduino IDE. It had WiFi. This was the greatest microcontroller release in the last decade, and it came from a company no one had ever heard of.

Since then, the ESP ecosystem has bloomed, and there’s a new ESP on the block. The ESP-32 is an even more powerful WiFi and Bluetooth-enabled chip that’s just as easy to program, and it costs three dollars. Microcontrollers have never been cooler.

For this week’s Hack Chat, we’re going to be talking all about the ESP. Our guest for this Hack Chat should need no introduction, but if you’re unfamiliar, [Sprite_tm] plays video games on his keyboard and has installed Linux on a hard drive. He also works at Espressif, the company behind the ESP-8266 and ESP-32, where he’s applied his skills towards tiny Game Boys and miniature Macs.

During this week’s Hack Chat, we’re going to be covering everything about the ESP, including peripherals, ultra-low power consumption, SIP packages, and what’s coming up for the ESP family. You are, as always, welcome to submit your questions for [Sprite]; just add those as a comment on the Hack Chat page.

join-hack-chat

Our Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. [Sprite]’s in China, so we’re not doing this one at the usual time: This week, the Hack Chat will happen at 7:00 am, Pacific, Friday, March 9th. Want to know what time this is happening in your neck of the woods? Have a countdown timer!

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about.

Jeroen Domburg Miniaturizes A Mac

His name may not ring a bell, but his handle will — Sprite_tm, a regular to these pages and to Hackaday events around the world. Hailing from The Netherlands by way of Shanghai, Jeroen Domburg dropped by the Hackaday Superconference 2017 to give a talk on a pet project of his: turning a Macintosh into, well, a pet.

You could say this is Jeroen’s second minification of vintage hardware. At last year’s Hackaday Superconference, he brought out the tiniest Game Boy ever made. This incredible hardware and software hack stuffs a complete Game Boy into something you can lose in your pocket. How do you top a miniature version of the most iconic video game system ever made? By creating a miniature version of the most iconic computer ever made, of course.

The tiny object in front of Jeroen in the title image is, in fact, a working Macintosh Plus that he built. Recreating mid-80’s technology using 2017 parts seems like it would be easy, and while it’s obviously easier than breaking the laws of physics to go the other direction, Jeroen faced some serious challenges along the way, which he goes into some detail about in his talk.

Continue reading “Jeroen Domburg Miniaturizes A Mac”