OLED LEGO Train Schedule

After seeing Ladyada’s Workshop, I started thinking about various ways Adafruit electronics and LEGO bricks could be combined.  I’ve always thought it would be cool to have a minifig scale video display instead of a sticker or printed brick.  So, I decided to give my minifigs a dynamic train schedule.

I used the following in this project:

The first step in building the train schedule is assembling the electronics.  Start by following the tutorial for the OLED and running the sample sketch to test your wiring.  Next up is adding an extension cable between the OLED breakout board and the breadboard.

  1. Break off a nine pin length of extra long 0.1” header.
  2. Remove the OLED from the breadboard.
  3. Insert the header in the breadboard in place of the OLED (this should start from where the GND pin was on the OLED and run to where the SDOUT pin was, stopping just short of the SDDETECT pin’s location).
  4. Break off a nine wire wide cable from the ribbon of female/female jumper wires.
  5. Plug the OLED into one end of the nine wire cable and plug the other end into the header pins on the breadboard (make sure to keep the order of the wires the same on each side).

Before continuing, you will need to download the project files from github.

The next step is adding a small bezel to the OLED so that the breakout board isn’t visible through the LEGO window brick.

  1. Open the bezel.svg file from the project folder in a vector based graphics program (I use Inkscape which is available for Linux/Mac/Windows and is open source).
  2. Print the bezel template out on plain white paper.
  3. Place a piece of black construction paper underneath the printed out template.
  4. Use a craft knife to carefully cut along the black rectangles, making sure to cut through both pieces of paper.
  5. Place the black construction paper bezel around the OLED with the thinnest border at the bottom (I used a tiny dab of white craft glue to hold the bezel to the breakout board).

Finally, it’s time to get out the LEGO bricks and start building! Open OledTrainScheduleLegoInstructions.pdf from the project folder and build steps one through eight. At this point, you should have a rectangular enclosure with a window on the front and a two stud wide opening on the back. Place a small piece of double sided tape on the back of the OLED and carefully place it on the inside back of the enclosure so that the OLED is centered in the window brick and the cables are routed through the opening on the back.

Continue with the instructions, closing up the top of the enclosure. You can now upload the sketch from the Arduino IDE and let your minifigs know when trains will be departing, which trains will be late, and which trains they just missed. The source code, bezel template, and LEGO instructions (in both PDF and LDR format) are available in github. I’d love to hear about or see other uses you come up with for a minifig scaled display in your LEGO creations.

Don’t forget to support the Ladyada workshop/hackerspace in LEGO! We need your votes to make it real!


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in! adafruit.com/mastodon

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 36,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.