Author Archives: Flo

Flappy Bird Now Exists in Real Life and Is Fully Playable

estimated reading time: 2 min

Flappy Bird is one of the most interesting titles in video game history. Not because of the gameplay, which is pretty basic and wasn’t at all groundbreaking at the time of release in 2013, but because of the subsequent controversies. By 2014, it had become the most downloaded free game on both the iOS and Android app stores. But its creator, Dong Nguyen, ended up removing the game from those stores, because he felt that it was too addictive and that it was a detriment to society. Now Engineezy has brought it back in the form of a real-life Flappy Bird game.

It didn’t take Nguyen very long to create Flappy Bird—reportedly just a handful of days. But Engineezy’s real-life version is much, much more complicated and took a lot more time. It is a physical game, in which the player controls an actual, tangible bird that flies between endless pipes on a revolving mechanism. As the bird goes further and further without a collision, the score continues to increase. There are even sound effects!

To make that all happen, Engineezy had to come up with several subsystems: something to move the bird, something to move the pipes around and around, something to adjust the heights of the pipes, something to detect collisions, and something to keep score.

The pipes ride on a chain mechanism, similar to a chainsaw, driven by a stepper motor. Conductive traces on that mechanism’s track send power to each pipe carrier, so servo motors can raise and lower the pipes. Each has its own “EEZYmoove” control board with a dedicated microcontroller development board. It uses a rotary encoder to monitor the position of each pipe and can set a new height before the pipe enters the “game screen” area.

The bird moves up and down on another servo-driven mechanism, which Engineezy designed specifically to be a bit unwieldy to match how the bird flies in the Flappy Bird game. It has a spring and an extended arm to create “floppiness” in the motion. The bird and the pipes move across a printed “screen” with the familiar cloudy backdrop.

In the center of that screen is a split-flap display for showing the score. To determine the score, Engineezy had to find a way for the game to check if the bird passes a pipe or collides with it. He achieved that in a very fun and clever way: by making the bird physically fall of its mount in the event of a collision. Magnets lightly hold it in place and if it falls off, a pogo pin circuit breaks and signals to the controller that the game is over.

The final trick was sound effects and instead of playing audio files, Engineezy added actual chimes. As the bird passes a pipe, a striker taps the chimes and produces a great sound effect.

All that was left was for Engineezy to challenge a friend to a gaming contest. We’ll let you watch the video to see who won.

Adapting An Old Rotary Dial For Digital Applications

estimated reading time: 1 min

Today in old school nostalgia our tipster [Clint Jay] wrote in to let us know about this rotary dial.

If you’re a young whippersnapper you might never have seen a rotary dial. These things were commonly used on telephones back in the day, and they were notoriously slow to use. The way they work is that they generate a number of pulses corresponding to the number you want to dial in. One pulse for 1, two pulses for 2, and so on, up to nine pulses for 9, then ten pulses for 0.

We see circuits like this here at Hackaday from time to time. In fact, commonly we see them implemented as USB keyboards, such as in Rotary Dial Becomes USB Keyboard and Rotary Dialer Becomes Numeric Keypad.

One thing that makes this particular project different from the ones we’ve seen before is that it doesn’t require a microcontroller. That said, our hacker [Mousa] shows us how to interface this dial with an Arduino, along with sample code, if that’s something you’d like to do. The schematic for the project shows how to connect the rotary dial (salvaged from an old telephone) to both a 7-segment display and a collection of ten LEDs.

The project write-up includes links to the PCB design files. The guts of the project are a 4017 decade counter and a 4026 7-segment display adapter. Good, honest, old school digital logic.

from wallabag — all feed https://ift.tt/oiJWhds

Adapting An Old Rotary Dial For Digital Applications

estimated reading time: 1 min

Today in old school nostalgia our tipster [Clint Jay] wrote in to let us know about this rotary dial.

If you’re a young whippersnapper you might never have seen a rotary dial. These things were commonly used on telephones back in the day, and they were notoriously slow to use. The way they work is that they generate a number of pulses corresponding to the number you want to dial in. One pulse for 1, two pulses for 2, and so on, up to nine pulses for 9, then ten pulses for 0.

We see circuits like this here at Hackaday from time to time. In fact, commonly we see them implemented as USB keyboards, such as in Rotary Dial Becomes USB Keyboard and Rotary Dialer Becomes Numeric Keypad.

One thing that makes this particular project different from the ones we’ve seen before is that it doesn’t require a microcontroller. That said, our hacker [Mousa] shows us how to interface this dial with an Arduino, along with sample code, if that’s something you’d like to do. The schematic for the project shows how to connect the rotary dial (salvaged from an old telephone) to both a 7-segment display and a collection of ten LEDs.

The project write-up includes links to the PCB design files. The guts of the project are a 4017 decade counter and a 4026 7-segment display adapter. Good, honest, old school digital logic.

[embedded content]

3D Printing A Modular Guitar Means It Can Look Like Whatever You Want

estimated reading time: 1 min

Got some spare filament and looking to build a guitar you can truly call your own? [The 3D Print Zone] has created a modular 3D printable guitar system that lets you easily mix and match different components for the ultimate in customization.

The build is based around a central core, which combines the pickups, bridge, and neck into one solid unit. This is really the heart of the guitar, containing all the pieces that need to be in precise alignment to get those strings vibrating precisely in tune. The core then mounts to a printed outer body via mating slots and rails, which in the main demo is made to look like a Les Paul-style design. This outer body also hosts the volume, tone, and pickup controls. Output from the pickups travels to the controls in the outer body via a set of metallic contacts.

What’s cool about this build is that the sky really is the limit for your creativity. As the video below demonstrates, the main build looks like a Les Paul. But, armed with the right CAD software, you can really make a guitar that looks like whatever you want, while the 3D printer does all the hard work of making it a reality. The files to print the guitar, along with the pickups and other components, are available as kits—but there’s also nothing stopping you from working up your own printed guitar design from scratch, either.

We’ve seen some other great 3D printed guitars before, too.

from wallabag — all feed https://ift.tt/7vboFLk

3D Printing A Modular Guitar Means It Can Look Like Whatever You Want

estimated reading time: 1 min

Got some spare filament and looking to build a guitar you can truly call your own? [The 3D Print Zone] has created a modular 3D printable guitar system that lets you easily mix and match different components for the ultimate in customization.

The build is based around a central core, which combines the pickups, bridge, and neck into one solid unit. This is really the heart of the guitar, containing all the pieces that need to be in precise alignment to get those strings vibrating precisely in tune. The core then mounts to a printed outer body via mating slots and rails, which in the main demo is made to look like a Les Paul-style design. This outer body also hosts the volume, tone, and pickup controls. Output from the pickups travels to the controls in the outer body via a set of metallic contacts.

What’s cool about this build is that the sky really is the limit for your creativity. As the video below demonstrates, the main build looks like a Les Paul. But, armed with the right CAD software, you can really make a guitar that looks like whatever you want, while the 3D printer does all the hard work of making it a reality. The files to print the guitar, along with the pickups and other components, are available as kits—but there’s also nothing stopping you from working up your own printed guitar design from scratch, either.

We’ve seen some other great 3D printed guitars before, too.

[embedded content]

Add Wood Grain Texture To 3D Prints – With A Model Of A Log

estimated reading time: 1 min

Adding textures is a great way to experiment with giving 3D prints a different look, and [PandaN] shows off a method of adding a wood grain effect in a way that’s easy to play around with. It involves using a 3D model of a log (complete with concentric tree rings) as a print modifier. The good news is that [PandaN] has already done the work of creating one, as well as showing how to use it.

The model of the stump — complete with concentric tree rings — acts as a modifier for the much-smaller printed object (in this case, a small plate).

In the slicer software one simply uses the log as a modifier for an object to be printed. When a 3D model is used as a modifier in this way, it means different print settings get applied everywhere the object to be printed and the modifier intersect one another.

In the case of this project, the modifier shifts the angle of the fill pattern wherever the models intersect. A fuzzy skin modifier is used as well, and the result is enough to give a wood grain appearance to the printed object. When printed with a wood filament (which is PLA mixed with wood particles), the result looks especially good.

We’ve seen a few different ways to add textures to 3D prints, including using Blender to modify model surfaces. Textures can enhance the look of a model, and are also a good way to hide layer lines.

In addition to the 3D models, [PandaN] provides a ready-to-go project for Bambu slicer with all the necessary settings already configured, so experimenting can be as simple as swapping the object to be printed with a new 3D model. Want to see that in action? Here’s a separate video demonstrating exactly that step-by-step, embedded below.

from wallabag — all feed https://ift.tt/uncVgRl

Add Wood Grain Texture To 3D Prints – With A Model Of A Log

estimated reading time: 1 min

Adding textures is a great way to experiment with giving 3D prints a different look, and [PandaN] shows off a method of adding a wood grain effect in a way that’s easy to play around with. It involves using a 3D model of a log (complete with concentric tree rings) as a print modifier. The good news is that [PandaN] has already done the work of creating one, as well as showing how to use it.

The model of the stump — complete with concentric tree rings — acts as a modifier for the much-smaller printed object (in this case, a small plate).

In the slicer software one simply uses the log as a modifier for an object to be printed. When a 3D model is used as a modifier in this way, it means different print settings get applied everywhere the object to be printed and the modifier intersect one another.

In the case of this project, the modifier shifts the angle of the fill pattern wherever the models intersect. A fuzzy skin modifier is used as well, and the result is enough to give a wood grain appearance to the printed object. When printed with a wood filament (which is PLA mixed with wood particles), the result looks especially good.

We’ve seen a few different ways to add textures to 3D prints, including using Blender to modify model surfaces. Textures can enhance the look of a model, and are also a good way to hide layer lines.

In addition to the 3D models, [PandaN] provides a ready-to-go project for Bambu slicer with all the necessary settings already configured, so experimenting can be as simple as swapping the object to be printed with a new 3D model. Want to see that in action? Here’s a separate video demonstrating exactly that step-by-step, embedded below.

[embedded content]

A RISC-V Operating System Instruction Manual

estimated reading time: 1 min

To some, an operating system is a burden or waste of resources, like those working on embedded systems and other low-power applications. To others it’s necessary, abstracting away hardware so that higher-level programming can be done. For most people it’s perhaps not thought of at all. But for a few, the operating system is the most interesting piece of software running on a computer and if you’d like to investigate what makes this often overlooked aspect of computer science interesting, take a look at this course on operating systems from Cornell University.

The operating system itself is called Earth and Grass Operating System because it splits the functionality of the operating system into three separate parts. The Earth layer involves dealing with hardware, the Grass layer involves hardware-independent aspects, and a third application layer implements other key operating system features. It’s built for a RISC-V processor, since that instruction set is completely open source and transparent about what it’s doing. It’s also incredibly small, coming in at around 2000 lines of code. The course covers nine areas, with the first six being core operating system functions and the remaining three covering more advanced operating system concepts.

For understanding the intricacies and sometimes mysterious ways that operating systems work, a course like this can go a long way into unraveling those mysteries and developing a deeper understanding of how it brings the hardware to work for higher-level software. We actually featured this operating system two years ago, before this course was created, which covers this project for those who like to take a more self-directed approach, or simply want a lightweight OS for a RISC-V system.

from wallabag — all feed https://ift.tt/Qebro9I

Reverse Engineering LEGO Island

estimated reading time: 2 min

While LEGO themed video games have become something of a staple, in 1997 they were something of an odity. LEGO Island became the first LEGO video game released outside of Japan in 1997 and become something of a hit with over one million copies sold. The game was beloved among fans and set the stage for more LEGO video games to come. In an effort of love, [MattKC] put together a team to reverse engineer the game.

The team set out with the intent to create a near perfect recreation of the codebase, relying on custom made tools to run byte checks on the rewrite compilation and the original binary. While the project is functionally complete, [MattKC] believes it is impossible to get a byte accurate codebase. This is because of what the team called “compiler entropy.” Strange behaviors exists inside of Microsoft’s Visual C++ compiler of the era, and small changes in the code have seemingly random effects to unrelated parts of the binary. To mitigate this issue would likely require either partially reverse engineering Visual C++ or brute forcing the code, both of which would take a large amount of effort and time for no real benefit.

Another interesting step the team had to work out was how the game handled graphics. In the version of Direct X used, the developers could chose between immediate mode and retained mode. The difference largely boils down to how models and assets are handled. In immediate mode, Direct X is largely just a render engine and everything else is handled by the developer. With retained mode, Direct X works more similarly to a game engine where all the model and asset management is handled by Direct X. Almost all developers ended up using immediate mode to the point that Microsoft deprecated support for retained mode. For this reason, if you were to download and run LEGO island on a modern Windows PC, it would yell at you for not having the proper libraries. There is debate about how best to handle this moving forward. The team could rely on an unsupported library from Microsoft, reverse engineer that library only making the functions needed, or using leaked source code.

With the completion of the reverse engineering, engineering can commence. For example, an annoying and persistent bug caused the game to crash if you tried to exit. While it was effective in closing the game, it also caused progress to be lost. That particular bug was fixed simply by initializing a variable in the game’s fronted. Interestingly, that bug was not present in the late betas of the game that had been dug up from the depths of the internet leading to questions as to why a rewrite of the fronted was necessary so late in the development. Now efforts are commencing to port the game to other platforms which bring with it fresh headaches including rewriting for OpenGL and the balance of keeping a historically accurate game with the needs of modern development.

from wallabag — all feed https://ift.tt/ANGM9OQ

Cute Tamagotchi Cow

estimated reading time: 2 min

Supplies

  1. ESP32 CYD (cheap yellow display) (2432S028R)
  2. suitable power source / power bank
  3. 3D printed parts. or some wood for the barn

or

  1. wood / plywood and color
  1. Arduino IDE software

(Basic experience with Arduino is required)

Step 1: The Cow Graphics

For our cow, we need a stage/barn with a feeding station and water trough, each of which displays different levels.

The cow should

  1. stand, smile, chew, look sad
  2. eat, drink
  3. lying down ruminating , smile, sleep

These images are stored as code on an extra file named “cow-all.h” and loaded when needed.

The images are self made, you are free to use them.

Step 2: The Cow Software

The CYD is a fantastic combination of ESP32 and Touchschreeen. It saves you the annoying soldering and cables.

My programming is admittedly a bit amateurish. You can certainly get more out of the CYD in terms of design or give the cow more functions. But at least the program steps are easy to follow.

The library can be used to simulate a wide variety of working surfaces. We don’t show a background, but concentrate on the cow, watering place and feeding place. Three click areas are integrated in a hidden manner, i.e. they are not visible but can be clicked in three places: Water and feed place for refilling and the cow itself for stroking.

The cow’s status is (soon) saved on the ESP32 so that the device can be switched off at any time and you keep the food/mood status.

The values of hunger and thirst change randomly. The ESP32 counts the milliseconds. These values can be set according to your personal preferences.

The file “cow-all.h” contains all the different cow images in code and must be stored in the same folder as “demo.ino” or “tamagotchi_cow.ino”!

Attachments

Step 3: Speaker and LDR Sensor

The speaker for ‘Mooh’ is optional. Unfortunately, I have not yet been able to get the sound function to work without complications with the screen. Every time the SD card is online the touchscreen is not working properly. Any idea?

The mp3 file(s) could be saved on the SD card. The connection pins are on the back of the CYD. I got the speaker from an old fixed line telephone.

The built-in LDR sensor (GPIO 34) tells the cow when to sleep. When it is dark, she lies down. During this time, water and food are not consumed.

Attachments

Step 4: The Barn

For the ambience, I quickly designed a stable with tinkercad.com and turned it into reality with the 3D printer. Of course, you can also build a wonderful miniature stable out of wood here. Don’t forget good ventilation at the back side.

Hay_Barn

Attachments

Step 5: Moooh

Function:

The cow eats and drinks when its internal water and feed levels drop (= hunger, thirst). If the water or feed container is empty, the cow is hungry, unhappy and mooing.

If you tap on water or feed, the supplies are replenished and the cow can eat. If you tap on the cow (= stroking), it is also happy and moos comfortably.

When the LDR notices darkness the cow is going to sleep. She does not eat and does not develop much hunger or thirst.

Have fun with your new pet!

from wallabag — all feed https://ift.tt/vS3d0Wc