Interactive Visual Acuity Puzzle (Lea Shapes) using RPi3 and Arduino micro

On one of our visits to the ophthalmologist we were told that we should start familiarizing Becca with the Lea shapes (as to why, you can find more about Becca’s journey here).  Because of her retinitis pigementosa, which is a retinal disease associated with Usher Syndrome, she will need to start vision testing much earlier than most children.  The Lea shapes are made up of four shapes that childrenlea-symbols-translucent-distance-eye-chart_6387678 can easily identify, they are the outline of a square, circle, apple, house, and primarily used with young children.  These shapes will eventually be used to test Rebecca’s visual acuity, similar to an eye chart that you would see at an eye exam visit but instead with shapes that a child can more easily identify.   This is typically not necessary for a child with normal vision but in Rebecca’s case they want to be able to begin assessing her vision by the age of one and a half  – two years of age where as in children with normal vision it is more around 4-5 where they already have an understanding of letters, numbers etc, and can use the normal eye chart.  We left that appointment with a black and white paper print out of the symbols that we were asked to review with Rebecca.  Not surprisingly Rebecca was not amused with the piece of paper and actually tried to eat it a couple of times.

I started to think of a different method of teaching her the shapes and in one of our visits to Rebecca’s audiologist (Ashleigh) for her Cochlear implant turn on, I saw that she was associating sounds to an object in the room.  Each time she made a sound she would flip a switch to a light up a toy and direct Rebecca’s attention to it.  I did a bit of digging and found that there is a whole theory behind this method in teaching kids to learn to hear called “sound-object association”.  I’m not sure if this is exactly what Ashleigh was doing but after reading an article on the topic by Ellen Rhodes, an Auditory Verbal Specialist, it made sense to me why it was important to help facilitating learning to hear.  Rebecca can’t really tell us when she heard a sound as her hearing is still in the infant stage and she does not fully understand what sound is at this point.  After reading about this approach and seeing it in practice, a light bulb (so to speak) went off that I could do something similar with teaching Rebecca the Lea shapes.

The idea was to create an interactive 3-D puzzle with the four Lea shapes that Rebecca could physically hold in her hand and place into corresponding spots on a puzzle board.  When she placed the shape into the proper spot on the puzzle board she would then get automatic visual stimulation through the smart lights in her room.  The “visual reward” for lack of a better term would correlate to the color of the block giving her another dimension of association, that being color.  So here is the finished training tool that we created.  The rest of this post will outline the steps on how it was created.

Here is the nearly finished prototype of the puzzle, the only thing missing is that the electronics are not mounted yet and a plate to cover the back needs to be made.

One think to note in the video…. I used five lights to demonstrate the puzzle.  Five lights however are really over-kill and this can be accomplished with one.  When I finish everything up and move it to Rebecca’s room it will use a single light.


If you have been following our blog you may have seen the post about the stairwell lights based on a Raspberry Pi and Phillips Hue smart lights.  This is an extension of that work, for getting started with the Pi this link is a good resource and vectors off to other useful information about the Pi.

The project is based again on an RPI3 which is used as a central hub along with a Hue smart lights bridge but this time it is paired with a couple of Arduinos and 2.4Ghz radio modules that are handling the wireless communication between the two devices.  So the puzzle at the left of the diagram is completely self contained and relies on no physical connection to the Pi bridge or the lights themselves (detailed build diagrams and code below)


The build


Raspberry Pi central hub and receiver (QTY 1)– A Raspberry pi is a single board computer that you can purchase for $35.  Here is a link the explains the raspberry pi in  more detail.  Raspberry pi 3raspberry_pi_3_large

Arduino Micro (QTY 2)– The Arduino micro is a small micro controller prototyping circuit board.  There is a large family of Arduinos that have varying levels of performance and cost, I chose the micro for the small size.  Its based off an ATMega324U 8-bit microcontroller.  I got mine here. 50458-img_6067


NRF24L01 (QTY- 2) –  The NRF24L01+ is a very low cost transceiver which can send and receive data on the 2.4GHz spectrum. They have two versions, one with a chip antenna and one with a board antenna.  Because range was not too much of a problem in my design and size was a bigger factor, I chose the variant with the board antenna. Picked these up off of Amazon for about $11.00 for a pack of ten.


Phillips Hue lights– These are a version of smart lights like many others that allow you the ability to control them through a smart phone.  The best part of these lights however is the REST API that Phillips provides that allows you to remove the phone from the equation and control the lights directly through an embedded device such as the Raspeberry Pi.hue

Reed Switches (QTY 4) –  The switches are used to detect the presence of the blocks.  A slot was routed out under each shape and a reed switch was glued into to place.  The video below shows the build.  These are readily available at Digi-Key or any other electronic supplier

CT10-1540-G1 Coto Technology | 306-1124-6-ND DigiKey Electronics

3.3volt regulator – Arduinos need between 7-12V to run but the NRF24L01+ needs 3.3v and will be damaged if we tried to power it from the same rail so an LDO was used to drop the voltage.  Any regulator that can output 150+mA could be used for this.

Capacitors (4X) -Probably the most critical step in the project is the decoupling cap for the radio.  These little guys need significant instantaneous power to remain stable during transmissions.  On the input of the regulator I used a 1 1.uF ceramic cap and and a .1 uF ceramic cap.  On the output I used a 10uF electrolytic and a .1uF ceramic cap.  This seemed to be adequate to maintain stability.

MDF and walnut – For the puzzle board I used a piece of MDF.  The MDF was cut into two 8.5″ X 8.5″.  I also used a piece of walnut that I had laying around for the blocks.

Magnets – Magnets were embedded into the puzzle blocks and were used to trigger the reed switches that were embedded into the puzzle.

Puzzle build

And here is a quick video showing the build.  (The electronic build and code follow this video.)


Electronic Build

Note: I chose the Arduin

Image result for arduino micro pinout

Arduino Micro Pin-out

o micros but there are other variants and if you are building a project based on this blog post I would recommend sticking with a more popular
Arduino that has better community support.  Also note that many of the pin-outs scattered about the interwebs are wrong.  I used this pin-out for my project and recommend that you do the same.

Following are the Fritzing diagrams and code for the puzzle transmitter ( the board that will be attached to the puzzle) and the Pi receiver board (the board that will be integrated with the RPi) respectively.

Note that the NRF24L01+ module is not breadboard friendly therefore a small proto-board had to be added between the breadboard and the module.


Fritzing diagram of Puzzle Board


Arduino Sketch for Puzzle Board.



Wiring diagram and code for Raspberry Pi Hub and Arduino



Fritzing Diagram of Raspberry Pi receiver board


Arduino sketch for Raspberry Pi receiver board


Pi Code – This python program will read four inputs that correspond to the puzzle shapes and colors and flash the Hue lights accordingly.  For more on the Hue API you can either visit Hues developer website or find more info in another basic project I put together.


Ill work on linking the source files to make it easier to use the code if anyone is going to base a project off of this.







  1. Jody Ramsay · · Reply

    You are a gift to this child. God knew what He was about when He placed Rebecca into your hands.

    Liked by 1 person

  2. Dorothy Casey · · Reply

    You guys are amazing. I will April 29th. Hope to bring a few friends too

    Liked by 1 person

  3. Grama Sue · · Reply

    This is brilliant. Your love for Becca is showing you the way.

    Liked by 1 person

  4. Holy crap this is incredible! Your daughter is lucky to have such a creative dad! BTW, patentable idea?! Just sayin’

    Liked by 1 person

    1. Thanks dude!! I am hoping that it will give her a jump start on learning the shapes.


  5. […] Most parents would do anything to enrich their kids’ worlds and teach them what they need to know. Hacker parents often take it one step further by modifying the kid’s world to allow them to work past a disability. To wit we have an interactive game board to help a toddler learn her shapes and colors. […]


  6. Shanno Gada · · Reply

    fantastic project,may i have the code of it?


  7. […] Most parents would do anything to enrich their kids’ worlds and teach them what they need to know. Hacker parents often take it one step further by modifying the kid’s world to allow them to work past a disability. To wit we have an interactive game board to help a toddler learn her shapes and colors. […]


  8. […] can see more about this build on their blog here and more background on their lighting system […]


  9. I am impressed by your efforts. You really inspire me. I wish you success and I am confident that you will get results.


    1. Thank you for your kind words. – Beth and Jake


  10. […] Interactive Visual Acuity Puzzle (Lea Shapes) using RPi3 and Arduino micro […]


  11. […] started our mission with a couple of open source projects that I was tinkering with from an internet connected smart puzzle to a smart lighting device to aid in illuminating dark hallways. That expanded into a number of […]


  12. Great job. Small tip for interactive play which you may have learned by now. Please take this as constructive. I don’t mean it to be critical in any anyway. The tip: be guided by the child and make play a joint conversation (the same as reading books etc). Bec reached for the yellow but missed. She gave up on that and focused on the red while Beth went yellow. Then Beth got the blue while Bec was trying to put the red in the house shape. All great fun. And once again, huge congrats for your incredible work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: