Rifqi Abdillah
Published © GPL3+

Candy Pages: Reading Rewards for Little Bookworms

Embark on sweet reading journeys with Candy Pages! Explore, read, and earn delightful rewards for young bookworms.

IntermediateFull instructions provided2 days130

Things used in this project

Hardware components

Wio Terminal
Seeed Studio Wio Terminal
Keypad 4x4
USB Cable, USB Type C Plug
USB Cable, USB Type C Plug
SparkFun Snappable Protoboard
SparkFun Snappable Protoboard

Software apps and online services

Arduino IDE
Arduino IDE
Google Colab

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)
3D Printer (generic)
3D Printer (generic)


Read more

Custom parts and enclosures

Candy Page CAD

You can build your own Candy Page :D


Bitmap Converter 24-bit to 16 bit

Convert your image to use it at Wio Terminal
from PIL import Image
import array
import os

def rgb332(r, g, b):
    r = r >> 5
    g = g >> 5
    b = b >> 6
    c = r << 5 | g << 2 | b
    return [c]

def rgb565(r, g, b):
    r = r >> 3
    g = g >> 2
    b = b >> 3
    c = r << 11 | g << 5 | b
    return [c >> 8, c & 0xff]

def convert(cvt, path, subpath):
    subpath = os.path.join(path, subpath)
    if not os.path.exists(subpath):

    for _, _, filesnames in os.walk(path):
        for file in filesnames:
            if (os.path.splitext(file)[-1] != '.bmp'):
            im = Image.open(os.path.join(path, file))
            width, height = im.size
            v = [cvt(r, g, b) for (r, g, b) in im.getdata()]
            b = bytearray()
            b.append(width & 0xff)
            b.append(width >> 8)
            b.append(height & 0xff)
            b.append(height >> 8)
            for pair in v:
                for i in pair:
            f = open(os.path.join(subpath, file), "wb")

def choose():
    option = int(input("Enter (1) for 8-bit colour convert, Enter (2) for 16-bit colour convert\n"))
    if option == 1:
        pathname = 'rgb332'
        return rgb332, pathname
    elif option == 2:
        pathname = 'rgb565'
        return rgb565, pathname
        print("Invalid input!")

rgbtype, pathname = choose();
convert(rgbtype, 'bmp', pathname)

Candy Page Code

Code and Picture Background for Candy Page


Rifqi Abdillah

Rifqi Abdillah

11 projects • 10 followers
Lecturer. studied informatics and electronics engineering. Passionate about Machine Learning, Edge Computing, image processing, and IoT.