TinkerPy is a simple coding language for your TinkerPy board. You write instructions, press Compile, and the board follows them โ lights, motors, buzzers, sensors!
Two magic blocks
- def setup(): runs once, when the board starts.
- def loop(): runs again and again, forever.
from tinkerpy_mega import * # ===== My TinkerPy Project ===== # This code block executes only once def setup(): pass # your code goes here # This code block executes forever def loop(): pass # your code goes here
Pins: o and i
- o1, o2, o3 โฆ are outputs โ things the board controls, like an LED or a motor.
- i1, i2, i3 โฆ are inputs โ things the board reads, like a button or a sensor.
๐ก Tip
Lines starting with # are comments. The board ignores them โ they are notes for humans.
๐ Your turn
Open Projects, tap Create New Project and find the setup and loop blocks.