Every inventor began with one small project. Pick one and bring your idea to life today!
Great inventors and great teachers all started with one small step. Take yours today!
The same kits we use in 40+ school labs โ grab yours and build something youโre proud of.
Log in to continue
A gadget that can show things feels alive: a name badge, a live thermometer, robot eyes that blink and smile. Learn every function of the little OLED screen and the classic 16ร2 LCD.
A small screen (0.96 inch) with 4 text lines. Every pixel makes its own light. It is switched on in every new project: import oled_display and oled_begin() are already there.
A screen with 2 lines of 16 letters and a backlight. Tick 16x2 LCD in Circuit Connections: it adds import lcd_16x2 and lcd_begin(0x27).
Both screens use only two wires: o7 (SDA) and o8 (SCL). Each screen has an address โ the OLED 0x3C, most LCDs 0x27 or 0x3F.
The OLED picks a line (1โ4) and an align (left, center, right). The LCD picks a line (1โ2) and a position (1โ16) where the text starts.
A moving picture that fills the OLED and plays by itself while your code runs: robot eyes or an emoji.
Type a message, pick a line and watch the oled_write() code and the screen change.
Switch between the two screens and pick the right one for your project.
# Add the libraries you need import oled_display # Give your pins easy-to-remember names i1 = set_name("hello_btn") # ===== Digital name badge ===== # This code block executes only once setup: oled_begin() # starts the OLED o7 = set_function(SDA) # cannot be changed o8 = set_function(SCL) # cannot be changed hello_btn = set_input(push_button, active_low) oled_write(1, center, large, bold, "ASHA") # write "ASHA" on OLED line 1 (large bold, centred) oled_write(3, center, small, regular, "Class 7 B") # write "Class 7 B" on OLED line 3 (small, centred) oled_write(4, center, small, regular, "TinkerPy coder") # write "TinkerPy coder" on OLED line 4 (small, centred) # This code block executes forever loop: if hello_btn == ON: # when hello_btn is ON oled_emoji_animation("smile", 2, 5, 0) # a smiling emoji fills the screen wait(3000) # pause here for 3000 milliseconds before continuing oled_clear() # clear everything off the OLED oled_write(1, center, large, bold, "ASHA") # write "ASHA" on OLED line 1 (large bold, centred) oled_write(3, center, small, regular, "Class 7 B") # write "Class 7 B" on OLED line 3 (small, centred) oled_write(4, center, small, regular, "TinkerPy coder") # write "TinkerPy coder" on OLED line 4 (small, centred)
A name badge: the name in large bold letters, then two small lines. Press the button for a smiling emoji, then the badge comes back. Change ASHA to your own name (7 letters fit in large).
# Add the libraries you need import oled_display import dht11 # Give your pins easy-to-remember names i1 = set_name("weather") # ===== Live temperature display ===== # This code block executes only once setup: oled_begin() # starts the OLED o7 = set_function(SDA) # cannot be changed o8 = set_function(SCL) # cannot be changed weather = set_input(dht11) oled_write(1, left, small, bold, "Room temperature") # write "Room temperature" on OLED line 1 (small bold, from the left) warned = 0 # set warned to 0 # This code block executes forever loop: t = dht_temperature(weather) # read the temperature in ยฐC oled_write(2, center, large, bold, t + " C") # write the value of t + " C" on OLED line 2 (large bold, centred) if t >= 35 and warned == 0: # when t >= 35 and warned == 0 oled_scroll(4, "Too hot! Drink water") # keep scrolling "Too hot! Drink water" along OLED line 4 warned = 1 # set warned to 1 if t < 35 and warned == 1: # when t < 35 and warned == 1 oled_clear_line(4) # also stops the scrolling warned = 0 # set warned to 0 wait(2000) # pause here for 2000 milliseconds before continuing
A live thermometer with a DHT11 on i1. The temperature and C are joined into one large text. At 35 ยฐC a warning scrolls along line 4 once; the flag warned stops it from restarting every loop.
# Add the libraries you need import dht11 import lcd_16x2 # Give your pins easy-to-remember names i1 = set_name("weather") i2 = set_name("light_btn") # ===== Room meter on the LCD ===== # This code block executes only once setup: lcd_begin(0x27) # the LCDโs I2C address (most: 0x27 or 0x3F; lcd_begin() finds it) weather = set_input(dht11) light_btn = set_input(push_button, active_low) o7 = set_function(SDA) # cannot be changed o8 = set_function(SCL) # cannot be changed lcd_scroll(1, "Welcome to the room meter") # keep scrolling "Welcome to the room meter" along LCD line 1 wait(6000) # pause here for 6000 milliseconds before continuing lcd_clear() # clear everything off the LCD # This code block executes forever loop: t = dht_temperature(weather) # read the temperature in ยฐC h = dht_humidity(weather) # read the humidity in % lcd_clear_line(1) # clear line 1 of the LCD lcd_write(1, 1, "Temp:") # write "Temp:" on LCD line 1, from place 1 lcd_write(1, 7, t) # write the value of t on LCD line 1, from place 7 lcd_write(1, 10, "C") # write "C" on LCD line 1, from place 10 lcd_clear_line(2) # clear line 2 of the LCD lcd_write(2, 1, "Humidity:") # write "Humidity:" on LCD line 2, from place 1 lcd_write(2, 11, h) # write the value of h on LCD line 2, from place 11 lcd_write(2, 14, "%") # write "%" on LCD line 2, from place 14 if light_btn == ON: # when light_btn is ON lcd_backlight(ON) # switch the LCD backlight ON else: # otherwise lcd_backlight(OFF) # switch the LCD backlight OFF wait(2000) # pause here for 2000 milliseconds before continuing
A room meter on the 16x2 LCD: a welcome message scrolls first, then each line shows a label, a number and its unit. Hold the button to light the backlight.
# Add the libraries you need import oled_display # Give your pins easy-to-remember names i1 = set_name("hand") # ===== Robot pet eyes ===== # This code block executes only once setup: oled_begin() # starts the OLED o7 = set_function(SDA) # cannot be changed o8 = set_function(SCL) # cannot be changed hand = set_input(ir_sensor, active_low) mood = 0 # set mood to 0 # This code block executes forever loop: if hand == ON and mood != 1: # when hand is ON and mood != 1 oled_eye_animation("happy", 0, 6, 500) # happy eyes, for ever mood = 1 # set mood to 1 if hand == OFF and mood != 2: # when hand is OFF and mood != 2 oled_eye_animation("sleepy", 0, 3, 2000) # sleepy eyes, for ever mood = 2 # set mood to 2
Robot pet eyes: happy when a hand is near the IR sensor, sleepy when it goes away. The mood variable makes each animation start only once, so it can play smoothly.
Put an OLED on the front of your robot car and play look_left before it turns left. It suddenly looks like it is thinking!
Scroll โHappy birthday Ammaโ along the LCD and play the happy_birthday tune on a passive buzzer.
Use the large size for the score and small for the player names โ a mini stadium screen on your desk.
Show your name, class and a fun line on the OLED. Add a second button that plays a different emoji, and a third screen with your hobby that appears every 5 seconds.
๐งฐ You need: TinkerPy board, OLED display, 2 push buttons, power bankRead a DHT11 and show temperature and humidity. Make the screen scroll a warning when it is too hot and show a happy emoji when the room is comfortable.
๐งฐ You need: TinkerPy board, DHT11, OLED or 16x2 LCDIn an OLED every tiny pixel makes its own light. A black pixel is simply switched off, which is why OLED screens show such deep black.
5 quick questions to check yourself โ free with your TinkerPy account.
Log in