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
Every gadget starts with one question: which pin does it go on? Your TinkerPy board has input pins that listen, output pins that act, a few pins with special jobs โ and invisible superpowers like WiFi and Bluetooth. Letโs meet them all!
A connection point on the board. A moduleโs signal wire (S / OUT / IN) goes to a pin; its VCC and GND go to the power and ground pins next to it.
A pin the board reads: ON / OFF from a button, or a number 0โ100 from a sensor or knob (analog). The Mini has i1โi2, the Mega i1โi4.
A pin the board controls: ON / OFF, or any level from 0 to 100 with PWM. Both boards have o1โo8.
Pulse Width Modulation: switching an output on and off very fast to give โhalf brightโ or โslow speedโ. Every output pin can do it.
A way for many modules (OLED screen, LCD, motion sensorโฆ) to share two wires: SDA on o7 and SCL on o8. Each module has its own address.
Tap each pin group to see what it can do.
Switch between the two boards and compare their pins and features.
# Add the libraries you need import buzzer # Give your pins easy-to-remember names i1 = set_name("bell_button") o1 = set_name("porch_light") o2 = set_name("bell") # ===== Doorbell with a light ===== # This code block executes only once setup: bell_button = set_input(push_button, active_low) porch_light = set_output(led) bell = set_output(buzzer) # This code block executes forever loop: if bell_button == ON: # when bell_button is ON bell = ON # turn bell ON porch_light = ON # turn porch_light ON else: # otherwise bell = OFF # turn bell OFF porch_light = OFF # turn porch_light OFF
A doorbell that works on BOTH boards: push button on i1, LED on o1, buzzer on o2. It uses only i1 and two outputs, so the Mini and the Mega both compile it. Pin plan first, code second!
# Give your pins easy-to-remember names i1 = set_name("button1") i2 = set_name("button2") i3 = set_name("button3") i4 = set_name("button4") o1 = set_name("light1") o2 = set_name("light2") o3 = set_name("light3") o4 = set_name("light4") # ===== Four-button panel ===== # This code block executes only once setup: button1 = set_input(push_button, active_low) button2 = set_input(push_button, active_low) button3 = set_input(push_button, active_low) button4 = set_input(push_button, active_low) light1 = set_output(led) light2 = set_output(led) light3 = set_output(led) light4 = set_output(led) # This code block executes forever loop: if button1 == ON: # when button1 is ON light1 = ON # turn light1 ON else: # otherwise light1 = OFF # turn light1 OFF if button2 == ON: # when button2 is ON light2 = ON # turn light2 ON else: # otherwise light2 = OFF # turn light2 OFF if button3 == ON: # when button3 is ON light3 = ON # turn light3 ON else: # otherwise light3 = OFF # turn light3 OFF if button4 == ON: # when button4 is ON light4 = ON # turn light4 ON else: # otherwise light4 = OFF # turn light4 OFF
TinkerPy Mega only: four buttons on i1โi4, each with its own LED on o1โo4. The Mega has four input pins. With no robot motors switched on, o3 and o4 are free for normal LEDs.
Device: TinkerPy Mini โ Compile 6 errors โ line 4: 'i3' isn't available on TinkerPy Mini (TinkerPy Mini only has i1โi2). Switch the device, or use a different pin.
The same four-button program checked for a TinkerPy Mini. Compile tells you straight away that the Mini has only i1 and i2. Fix it by switching the device back to Mega, or by planning a project that needs only two inputs.
# Add the libraries you need import ultrasonic import motor # ===== Robot that stops at walls ===== # This code block executes only once setup: i3 = set_input(ultrasonic_trig) # cannot be changed i4 = set_input(ultrasonic_echo) # cannot be changed o3 = set_output(right_motor_P) o4 = set_output(right_motor_N) o5 = set_output(left_motor_P) o6 = set_output(left_motor_N) # This code block executes forever loop: distance_cm = distance() # how far it is, in cm if distance_cm > 0 and distance_cm < 20: # a wall closer than 20 cm? robot_control("S", 0, "S", 0) # stop both wheels else: # otherwise robot_control("F", 60, "F", 60) # both wheels forward at 60% wait(50) # pause here for 50 milliseconds before continuing
TinkerPy Mega: a robot that stops at walls. Switching on Ultrasonic and both motors in Special components wrote the fixed-pin lines: i3 and i4 for the ultrasonic sensor, o3โo6 for the motors. On a Mini the ultrasonic lines use i2 and i1 instead. You will code robots in TinkerPy Coder, chapters 3 and 4.
The little square chip on your board holds the processor, memory and the WiFi radio โ a complete tiny computer.
One bus (two wires) picks up many children (modules). Each child has a different house number โ the I2C address.
A cricket captain plans who bats where. A good coder plans which part goes on which pin before writing code.
Draw your TinkerPy board on chart paper. Label every input (i1โi4) and output (o1โo8) and colour the special jobs: o7/o8 I2C, o3โo6 motors, ultrasonic pins. Add a WiFi and Bluetooth sticker for the board features.
๐งฐ You need: chart paper, sketch pens, your board or a photo of itChoose a gadget (a smart doorbell, a night lamp, a quiz buzzer). Make a table: part, input or output, digital or analog, pin. Check it fits a Mini โ if not, mark it Mega. Then set it up in Circuit Connections and compile.
๐งฐ You need: notebook, TinkerPy CodeThe same kind of tiny WiFi chip family that runs your TinkerPy board is used in many smart plugs, smart bulbs and other home gadgets around the world.
5 quick questions to check yourself โ free with your TinkerPy account.
Log in