by fatimawehbi | updated February 13, 2019

Raspberry pi puzzle for affordable coding and other skills teaching. This is an affordable platform dedicated to teachers and parents to create educational games for their students and kids from the age of 4-7 yo. It is a screen-free open source project that doesn't need a constantly available source of electricity and aims to give kids in unprivileged areas the opportunity to learn basic skills of this era like coding.


In a world running on computers, coding is becoming essential knowledge and many countries has already included it in their curriculum.  Many educators and researchers argue that the basic skills of coding, such as sequencing, pattern recognition and if/then conditional logic, should be introduced alongside or even before traditional reading, writing and math. Recently, many tools have been developed to bring these skills to kindergarteners in a fun and playful way. Most of these tools require computers/tablets, available source of electricity not to mention skyrocketing prices of some products which make it inaccessible to kids in communities lacking financial resources. This project aim to fill the gap between the poor and the rich, giving the less privileged kids (4-7 yo) an affordable, portable, customizable and screen free open source tool to learn not only coding skills but also learn about any educational topic depending on the kit customized and used by the teacher.

References : 

  1. https://www.edweek.org/ew/articles/2013/09/01/kappan_kafai.html?qs=digital+divide
  2. http://www.eduhk.hk/cte2017/doc/CTE2017%20Proceedings.pdf#page=121

For more pictures:


February 12, 2019 at 2:16 PM
Comments (0)

Please sign in to leave comments

Write the Debian image with the needed packages to the SD card:

  1. Insert the SD card into your computer.
  2. Head to the start menu or screen and type "disk management." Open the disk management program and find your SD card in the list.
  3. Right-click and delete all the partitions on your SD card. When it's empty (unallocated/ non alloué), right-click on it and create a “new simple volume” / “nouveau volume simple” (it doesn't matter what filesystem you format it to, your computer just needs to recognize it).
  4. Browse for your image file in my case it is : J:/RaspberryPi_images/boot.img
  5. Under the "Device" (Périphérique)  box, select your SD card, in my case it’s I:\
  6. Click "Write" (Ecrire) to write the image to the SD card.
  7. When it finishes, eject the SD card and insert it into your Raspberry Pi.


February 12, 2019 at 2:26 PM
Comments (0)

Please sign in to leave comments

To prepare Raspberry Pi SD card using Microsoft Windows and a program called Win32DiskImager ( super easy installation).

  1. Download the image from the link below (15 GB space required) https://drive.google.com/open?id=1tWcHTiUOE7QHVS9LEmr9VBgL1gpX1Exh
  2. Download and Install Win32DiskImager https://sourceforge.net/projects/win32diskimager/

February 12, 2019 at 2:53 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 2:59 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:04 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:05 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:13 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:13 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:18 PM
Comments (0)

Please sign in to leave comments

Pose estimation is of great importance in many computer vision applications: robot navigation, augmented reality, and many more. This process is based on finding correspondences between points in the real environment and their 2d image projection. This is usually a difficult step, and thus it is common the use of synthetic or fiducial markers to make it easier.

One of the most popular approach is the use of binary square fiducial markers. The main benefit of these markers is that a single marker provides enough correspondences (its four corners) to obtain the camera pose. Also, the inner binary codification makes them specially robust, allowing the possibility of applying error detection and correction techniques.

The aruco module is based on the ArUco library, a popular library for detection of square fiducial markers developed by Rafael Muñoz and Sergio Garrido:

S. Garrido-Jurado, R. Muñoz-Salinas, F. J. Madrid-Cuevas, and M. J. Marín-Jiménez. 2014. "Automatic generation and detection of highly reliable fiducial markers under occlusion". Pattern Recogn. 47, 6 (June 2014), 2280-2292. DOI=10.1016/j.patcog.2014.01.005

An ArUco marker is a synthetic square marker composed by a wide black border and a inner binary matrix which determines its identifier (id). The black border facilitates its fast detection in the image and the binary codification allows its identification and the application of error detection and correction techniques. The marker size determines the size of the internal matrix. For instance a marker size of 4x4 is composed by 16 bits.


February 12, 2019 at 3:19 PM
Comments (0)

Please sign in to leave comments

The puzzle pieces have 2 faces:

  1. One having the markers and that is unchangeable
  2. The other is where the teacher or the parent can stick their puzzle pictures or symbol and that can be customized depending on the game designed.

For more pictures:



February 12, 2019 at 3:20 PM
Comments (0)

Please sign in to leave comments

# import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
from gpiozero import Button
import cv2
import cv2.aruco as aruco
import numpy as np
import RPi.GPIO as GPIO
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
rawCapture = PiRGBArray(camera)
# camera.resolution = (1024, 768)
white = Button(17)
# grab an image from the camera
camera.capture(rawCapture, format="bgr")
image = rawCapture.array
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
aruco_dict = aruco.Dictionary_get(aruco.DICT_4X4_100)
parameters = aruco.DetectorParameters_create()
#lists of ids and the corners beloning to each id
font = cv2.FONT_HERSHEY_SIMPLEX #font for displaying text (below)
corners, ids, rejectedImgPoints = aruco.detectMarkers(gray, aruco_dict, parameters=parameters)
if np.all(ids != None):
    aruco.drawDetectedMarkers(image, corners)
    strg = ''
    for i in range(0, ids.size):
        strg += str(ids[i][0])+', '
    cv2.putText(image, "Id: " + strg, (0,64), font, 1, (0,255,0),2,cv2.LINE_AA)
    ##### DRAW "NO IDS" #####
    cv2.putText(image, "No Ids", (0,64), font, 1, (0,255,0),2,cv2.LINE_AA)
puzzle = all(ids[i] <= ids[i+1] for i in range(len(ids)-1))
if puzzle:
# display the image on screen and wait for a keypress
cv2.imshow("Image", image)


February 12, 2019 at 3:20 PM
Comments (0)

Please sign in to leave comments

February 12, 2019 at 3:21 PM
Comments (0)

Please sign in to leave comments

Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it from another device by remote control.

VNC is a graphical desktop sharing system that allows you to remotely control the desktop interface of one computer (running VNC Server) from another computer or mobile device (running VNC Viewer). VNC Viewer transmits the keyboard and either mouse or touch events to VNC Server, and receives updates to the screen in return.

You will see the desktop of the Raspberry Pi inside a window on your computer or mobile device. You'll be able to control it as though you were working on the Raspberry Pi itself.

(For more details:https://www.raspberrypi.org/documentation/remote-access/vnc/)

February 12, 2019 at 3:21 PM
Comments (0)

Please sign in to leave comments

List of materials:

  1. Raspberry pi 3 model B+

  2. Power supply 5V 2A

  3. SD card (16 GB)

  4. Pi Camera V2.1

  5. Push button

  6. Two LEDs (Green, Red)

  7. Two Resistors (100 Ω)

  8. Jump wires

  9. Bread board

  10. Ethernet cable for remote access to the raspberry pi

  11. Cardboards.

  12. Glue

  13. Printed ArUco markers (check document attached "codes_print.pdf")

Design Files
February 12, 2019 at 3:54 PM
Comments (0)

Please sign in to leave comments

On your computer download and install the VNC viewer:


February 13, 2019 at 10:23 AM
Comments (0)

Please sign in to leave comments

The goals:

  1. Get the RPi IP address.
  2. Enable VNC (On the provided image this should be enabled already but better be safe and check it)

For this step you need:​

  1. HDMI cable

  2. Display screen

  3. keyboard

  4. Mouse


  1. Connect the raspberry pi to the monitor, the mouse and the keyboard as well as to your computer via the Ethernet cable.
  2. The username and password of the raspberry pi by default:

    Username: pi

    Password: raspberry

  3. To get the IP address of the Raspberry Pi, open the terminal and type next to the $ symbol: hostname -i.

  4. To enable the VNC: Menu → preferences → raspberry pi configuration → interfaces → VCN enable.

February 13, 2019 at 10:38 AM
Comments (0)

Please sign in to leave comments

  1. Open the VNC viewer.
  2. Insert the IP address of the raspberry pi in the VNC viewer.

  3. Type the password in the authentication box that appears, and that is by default: raspberry

  4. You can find the code ("puzzle") in this path: /home/pi/fatima/tests/exec

To run the code:

  1. Open the terminal.
  2. Type next to the $ symbol: ./fatima/tests/exec/puzzle

February 13, 2019 at 11:21 AM
Comments (0)

Please sign in to leave comments

This is an example to test the prototype.

  1. Download and print the attached pdf.
  2. Cut the arrows and stick them on the changeable side of the puzzle.
  3. Give the student a path to follow on the map.
  4. Make sure that the ArUco markers at the back are in the right order with respect to the arrow that you are sticking on the other side.
  5. When the puzzle is done, expose the back (that has the ArUco markers) to the camera and push the button.
  6. If the puzzle is done right the green LED will light. Otherwise the red LED will.

Check this link to see how it functions:


Design Files
February 13, 2019 at 12:39 PM
Comments (0)

Please sign in to leave comments