TINKER PiEDESIGN IN INDIA

Display + Keys Brick

Displays · SKU TP-D02

OLED screen plus a 5-way keypad – menus and games without using any board pins.

₹499

Pre-order

Works with TinkerPie V1 · same JST-PH cables as the board · Delivery across India: ₹100, 3–7 days · 7-day replacement for damaged or defective kits

About this kit

The Display + Keys Brick combines a socket for a 0.96 in 128 x 64 OLED screen with a five-way keypad: UP, DOWN, LEFT, RIGHT and OK. Key presses are debounced, repeat when a key is held and are stored until the program reads them, so students can build menus and games without using any board pins.

Features

Specifications

Size64 x 40 mm
Display0.96 in OLED, I2C
Keys5 x 5 mm tactile
InterfaceI2C 0x3A-0x3B + 0x3C
BrainCH32V003

How to use it with TinkerPie

  1. Connect the brick’s BUS IN to any TinkerPie SENSOR 1-4 port with a 4-pin JST-PH cable.
  2. Plug a 0.96 in OLED into its socket. If the screen stays dark, move the pin-order jumper.
  3. More bricks? Plug the next one into BUS OUT (or use the I2C Hub).
  4. Install the TinkerPie and TinkerPieBricks Arduino libraries, open the sketch below, choose the board ESP32S3 Dev Module and upload.

Libraries: TinkerPie and TinkerPieBricks (Arduino IDE: Sketch → Include Library → Add .ZIP Library). Full guide: getting started with TinkerPie Bricks.

Quick start

Upload this, open the Serial Monitor at 115200 baud and watch the TinkerPie matrix.

Quick-start sketch (Arduino C++)
// Display + Keys Brick (TP-D02): quick start
// Reads the brick and shows the value on the TinkerPie matrix and in the Serial Monitor (115200 baud).
#include <TinkerPie.h>
#include <TinkerPieBricks.h>
using namespace tinkerpie;

tpb::Keys keys;

void setup() {
  Serial.begin(115200);
  tinkerpie::begin();            // also starts the SENSOR ports (I2C bus Wire1)
  if (!keys.begin()) Serial.println("Display + Keys Brick not found at 0x3A: check the cable to SENSOR 1-4");
  oled::clear();
  oled::showText("Press a key", 0);
}

void loop() {
  uint8_t p = keys.pressed();        // bits: 1 UP, 2 DOWN, 4 LEFT, 8 RIGHT, 16 OK
  if (p) { oled::showText(String("keys: ") + p, 2); music::beep(); }
  basic::pause(30);
}

Project: Menu with the 5 keys

The OLED shows a menu. UP and DOWN choose, OK runs the item: temperature, light level or a beep.

Menu with the 5 keys (Arduino C++)
// Menu with the 5 keys: Display + Keys Brick (TP-D02)
// The OLED shows a menu. UP and DOWN choose, OK runs the item: temperature, light level or a beep.
#include <TinkerPie.h>
#include <TinkerPieBricks.h>
using namespace tinkerpie;

tpb::Keys keys;
int sel = 0;
const char *ITEMS[] = { "Temperature", "Light level", "Beep" };

void setup() {
  Serial.begin(115200);
  tinkerpie::begin();            // also starts the SENSOR ports (I2C bus Wire1)
  if (!keys.begin()) Serial.println("Display + Keys Brick not found at 0x3A: check the cable to SENSOR 1-4");
  keys.repeat(25);
}

void loop() {
  if (keys.wasPressed(1)) sel = (sel + 2) % 3;   // UP   (key bits: 1 UP, 2 DOWN, 4 LEFT, 8 RIGHT, 16 OK)
  if (keys.wasPressed(2)) sel = (sel + 1) % 3;   // DOWN
  for (int i = 0; i < 3; i++) oled::showText(String(i == sel ? "> " : "  ") + ITEMS[i], i);
  if (keys.wasPressed(16)) {
    if (sel == 0) oled::showText(String(input::temperature(), 1) + " C", 4);
    if (sel == 1) oled::showText(String(input::lightLevel(), 0) + " lux", 4);
    if (sel == 2) music::beep();
  }
  basic::pause(30);
}

More TinkerPie Bricks

OLED Display Brick (TP-D01)OLED Display BrickTP-D01Add a sharp 0.96 in OLED screen to any TinkerPie project.₹299Pre-orderTinkerPie V1 boardTinkerPie V1 boardThe all-in-one coding, robotics and AI board, designed in India.₹7,999Pre-orderIO-4 Smart Brick (TP-B01)IO-4 Smart BrickTP-B01Connect any analog or digital sensor to TinkerPie – 4 ports, each analog, digital or PWM.₹499Pre-orderLine Follower 5 (TP-B02)Line Follower 5TP-B02Five IR sensors in one bar – build a fast line-following robot in minutes.₹499Pre-order

See all 53 TinkerPie Bricks