For students¶
Build¶
Open the studio. Across the top are the four steps, in order: build, try it, ship it and running, with the stop button beside them. You start on build. Pick your device. Drag a when block onto the bench (the thing the device watches for), then snap do blocks inside it (what it does). The CircuitPython it becomes is on the right, and it changes as you build. Building and the simulator work without signing in.
Each block's settings are on the block: which sensor and the line it crosses, how often a schedule runs, the color, how bright, which melody and how fast. A sensor program acts once each time the reading crosses the line, not on every check while it stays over it, the same way it runs once you ship it.
Sign in¶
Press sign in at the top right of any page and sign in with your student ID and PIN. Signing in lets you keep your work, share it, and ship it to your own devices. If player two is switched off, you can still sign in and do all of that; you just cannot ask it questions.
Try it in the simulator¶
Go to try it and press run. Move the sensor slider, hold the button, or tap the screen, and watch what the device would do. Click a line number to stop there. The simulator is a practice run; the board is the real test.
Add your device¶
Open devices and add a device (the studio's ship it step links there when you have none of the kind you are building for). Pick what it is and give it a name (lowercase letters, digits and dashes, starting with a letter). bench shows you two lines once:
Plug the board in, open its CIRCUITPY drive, put those two lines in settings.toml beside its Wi-Fi lines,
and save. The board restarts and finds teenyverse.net. The device is on your devices page and in the studio's runs on list right away, marked
offline until the board is running with those lines. If you lose the two lines before you save them, add the
device again under a new name.
Ship it¶
With a whole program on the bench, go to ship it, name the program, pick the device it runs on and what it listens to, and press ship it. It runs with the settings on your blocks. It runs on the device through teenyverse.net, and keeps running after you close the studio. save, off keeps it without turning it on.
running lists your programs, on or off, with load, turn off, share and forget. The number beside running is how many are on right now.
The stop button¶
The stop button beside the four steps halts the simulator. With a device picked under ship it, it also turns off every program of yours on that device and sends the device an emergency stop.
Take the code¶
When the blocks cannot say what you want, press take the code. The code becomes yours to edit, and your when
and do blocks stop writing it. In their place, the left side shows your code as blocks, one block per line: an if,
a while, a call. Change a block and the code changes; type in the code and the blocks redraw. A line the blocks
cannot draw yet shows as a grey block and stays exactly as you wrote it. If the blocks pause, a line is indented
with a tab or by something other than four spaces; fix it in the code and they come back.
check reads it for mistakes without running it; get code.py downloads it to copy onto the board's CIRCUITPY
drive. Code that imports bench needs the bench library on the board: get the bench library downloads it
for your device; copy the bench folder from its lib folder into the lib folder on the CIRCUITPY drive, once
per board. ship it sends block programs;
your own code goes onto the board as code.py.
back to blocks returns to your when and do blocks, just as you left them. If your code has changes you have not saved, bench asks first: save it, leave the changes, or stay.
Share¶
share on a program or a piece of code gives you a six-letter code. A classmate types it into got a share code? (in the studio, or on programs) and gets their own copy. Shares close after a week.
Everything you have¶
programs is one place for all of it: every program you shipped, with its runs, and every piece of code you saved, each with open in the studio, share and forget.