Hey everyone, this is my first instructable and I'm going to show a way to make a cool Lego display that can be used in a variety of ways. In my case, it hosts arcade games.
This project isn't too hard to assemble but it's clean and has endless possibilities in terms of coding after the initial construction. Also, the code I wrote is fully scale-able so it'll work on any size display whether that be 16x16, 8x8, or anything in between. I haven't tested it with anything larger but I'm sure the program would work the same (just a bit slower).
The materials I used for this are as follows:
- Lego Bricks (excuse the knockoff pieces)
- 2x8 plates (x20)
- 2x4 bricks (probably close to 100)
- 1x1 bricks with side attachment point (x18)
- Dot Matrix (x4)
- mCookie Core & Hub
- IR Receiver
- IR Remote (Any should really work although one comes in the expert mCookie kit)
- mCookie Battery Pack
- I think you'll need to buy the jumper wires separately if you don't get a kit.
Step 1: Put the Displays Together
Before getting started on the Legos, the screens need to come together. To do this, I hot-glued the four screens at the edges then linked them as seen in the picture. The screens are similar to the Adafruit neopixel displays and operate off the same library.
Step 2: Construction of the Frame, Planning
Luckily enough, the dimensions of the display work out nicely for Legos. The actual width/height of the full made display is just under 15 and 1/3 blocks. The edges of the displays are around 1.25 blocks in thickness so some tricks can be done with side mounting brackets. Finally, the height of the display is roughly 13 blocks.
With these dimensions, designing a frame becomes pretty straightforward.
Step 3: Construction of the Frame, Building It
The assembly of Legos is pretty straight forward so here are some detailed images to guide the process. The walls are completely divided into parts because there needs to be a little room for flexibility as the screen doesn't quite fit perfectly into the frame.
The side walls are mirror images. There is only one shown here.
Step 4: Add on the Processor!
So this is where the mCookie set comes in handy. Assembly is extremely easy for the mCookie boards (Pogo-pins and magnets are literally magic) and the Lego integration makes the cores easily mountable on the back-side of the display. All the screen needs is a core module and a hub module through which the screen connects to the IIC (I2C) port. The IR Receiver is connected to data pins 6/7.
Step 5: Program the Goodies
The mCookie set is, basically, a miniaturization and simplification of Arduino boards/shields. It uses a modified Arduino IDE (available on their website) to make the programming the boards identical to the process for your standard Arduino.
I wrote a basic abstract class (Game) for developing games and a sample game (Snake) to see how each function is implemented. The sketch + class + README (read it for play instructions) files are available in the attached zip. If you end up making some games with this please post them as I'd love to see what other people are doing!