# A Mini Stacker Arcade Cabinet

For [LumoW], what started as a school project turned into a passion project. He and his team made a hardware implementation of an arcade game called Stacker. Never heard of it? It’s pretty fun, kind of like an inverse Tetris. You can play the flash version here and see their mini arcade version after the break.

The game is based around the Mojo FPGA which the class required, and it’s programmed entirely in bitwise operators. It uses WS2812 RGB LEDs to represent the individual tower building blocks, and these are mounted on plywood in a matrix and separated into cells by a grid of foam board. After some trial and error, the team found the perfect shade of acrylic to diffuse the bright dots into glowing squares.

Since the game only needs one input, we don’t think [LumoW] should apologize at all for using the biggest, baddest button they could find. Besides, the game has that edge-of-your-seat action that can turn panic into heavy-handedness and cool DIY arcade games into shards of sadness.

Looking for something more advanced to do with an FPGA? Try your hand at vector games.

# Python Can Be Your Best Friend When It Comes To Binary Math

If you’re into microcontrollers you know the ability to think and perform math in binary is a must. [Joe Ptiz] has been looking for a way to keep from being distract by the math when coding while still keeping the binary strings in the forefront of his mind. The solution he came up with is to use the Python interpreter as a binary math aide.

We knew that you could use Python to convert between decimal, hexadecimal, and binary. But we failed to make the leap to using it for troubleshooting bit-wise operations. We can see this being especially useful when working with sixteen-bit I/O ports like those found on STM32 chips. For us it’s easy to do 8-bit math in our head, but doubling that is another story.

The image above is one screenshot from [Joe’s] tutorial. This illustrates a few different bit-wise operators given decimal inputs but displaying binary as output. He also illustrates how you can use python to test out equations from C code by first setting the variables, pasting the equation, then printing the result to see if the output is what was expected.

# AVR Programming 03: Reading And Compiling Code

In the last installment of our tutorial series we built a simple circuit on a breadboard and programmed an ATmega168 to make it run. That proves that you know how to follow directions, but the eureka moments of doing everything yourself are on the way. This time around you will get down and dirty with the datasheet, learning where each line of the sample code came from, and give your recently installed compiler a test drive. We will:

• Talk about bitwise operators and how they work when coding for microcontrollers
• Discuss C code shorthand
• Review the sample code from Part 2 and talk about what each line of code does
• Learn to compile code

If this is the first you’ve heard about our AVR Programming series, head back to Part 1 and start from the beginning. Otherwise, take a deep breath and we’ll being after the break.