Display tiles and legends#
A display tile shows text and pictures that can change during a match. On a screen key the display is inside the cap, so the key’s legend changes: the same key can say INTAKE in one part of a match and CLIMB in another. The disp2 colour display shows the same kind of stored pictures on a larger panel, next to the keys rather than in one.
The display tiles#
| Tile | Panel | Keys | Pictures |
|---|---|---|---|
| disp1 | 128 × 32 monochrome, 21 columns × 4 rows of text | none | no, but messages |
| disp2 | 160 × 128 colour, 13 columns × 8 rows of text | none | streamed, and 32 stored |
| disp3 | 128 × 64 monochrome, 21 columns × 8 rows of text | none | no, but messages |
| screenkey1 | 128 × 128 colour, inside a key cap | 1 | streamed, and 32 stored |
disp1 shows readouts: match time, a mechanism state, a message from the robot. disp2 shows the same in colour, plus full-colour pictures: a mode, a target, a status image. screenkey1 is one key whose cap is the screen.
All three are ordinary tiles: they go anywhere on the chain and are addressed like any other.
Fitted upside down? On Your board, choose Upside down on the tile’s row, then save. Everything on the screen turns half round. Text is redrawn at once; a picture on the screen has to be shown again. It needs tile firmware 0.4.1 or newer.
Showing text and pictures#
A display tile shows text in a grid of characters, drawn in the tile’s own font.
There are two ways to show a picture:
| Stream it | Store it in a slot | |
|---|---|---|
| Colours | Two, dithered | Full colour |
| Time to show | ~0.2 s, every time | A few milliseconds |
| Time to load | none | a few seconds, once |
| Kept where | nowhere; the panel holds it until cleared | the tile’s own flash chip |
Stream a picture you show once, from the Python library. Store the pictures you use as legends, from the config app.
A disp2 can also draw: lines, rectangles and text that a program on the Driver Station laptop moves as the robot does, such as a swerve drive or the robot on the field. See Drawing on a display.
screenkey1 and disp2 each store up to 32 pictures. Each numbered place is a slot.
Loading a picture into a slot#
In the config app, go to 3 Extras → Pictures. Every screenkey1 and disp2 is listed with its slots, checked as the page opens: each slot is empty or shows its picture.
- Click a slot, then Add a picture to slot n.
- Choose From a file, or Make one from words for a legend that is just text.
- Choose Fit, with bars or Stretch to fill, and, on a colour panel, Full colour or Two colours. Two colours is smaller and faster to load. The app shows what the tile will actually draw, re-sized and encoded for that panel, not the file you picked.
- Press Store in slot n.
The slot is erased when the transfer starts and holds a picture again only once the whole transfer has arrived and its checksum matches. An interrupted store leaves the slot empty, never half-drawn. If it fails, the app says so; store it again.
Pictures are kept on the tile as soon as they arrive, so they need no Save, and they stay through power cycles.
Using stored pictures#
Click a stored slot for what you can do with it:
- Show on the tile now puts it on the panel, to check it.
- Replace stores a new picture in the same slot.
- Edit a copy reads the picture back from the tile, to change its colours or format or store it in another slot, without the original file. Reading back is slower than storing: about 8 seconds for a full-colour picture, 1 second for a two-colour one.
- Erase empties the slot.
Checking and reading slots back needs current tile firmware.
Scenes: switching the panel from the robot#
The robot switches what the panel shows by sending a number, a legend code. In the config app each code is a scene: how the whole panel looks while the robot is doing one thing, such as intaking or climbing. Go to 3 Extras → Scenes and press + New scene.
For each display tile, a scene shows:
- Unchanged — the scene leaves that display as it is.
- A picture — one of the tile’s stored slots. One picture a scene.
- Words — a message, written line by line, with a colour and double height per line on a colour panel. Lines left empty are blank when the scene shows. The message is kept by the main module, so it works on a
disp1, which cannot store pictures.
A scene can also colour any key on an RGB tile: click the key under Key colours in this scene and pick a colour, Usual to put it back on its colour in your setup, or Unchanged to leave it out of the scene. See Changing a key’s colour the same way.
Give the scene a Name: it is for you, kept in this browser, and it names the constant in the robot code. Show it on the panel now shows the scene on the real panel, as the robot would; Back to normal ends it. In the OpMode, under the editor, has the lines to put in robot code.
There are fifteen codes, 1 to 15, shared by every tile on the board, so up to fifteen scenes. Zero is never a scene: it stops a rumble and leaves every screen unchanged. A code that is not a scene does nothing, and so does a picture whose tile is unplugged or whose slot is empty. No error is shown.
The main module can hold about 2 KB of messages alongside the rest of your setup: enough for a full four-row message on every code of a disp1. If a message will not fit, the config app says so and keeps your setup as it was.
Scenes are part of your saved configuration, so save when you are happy with them.
Getting them there from a terminal#
Everything above is also a command on the serial channel:
bbctl --rumble-list # what is bound now
bbctl --rumble-bind 3 5 0 # code 3 → tile 5, slot 0
Loading a picture is disp <addr> slot <n> begin/data/end, which the Python library wraps as board.disp_store_image().
Next#
Once the pictures are stored and the scenes are made, the robot can switch between them mid-match — see Changing legends in a match.