Skip to content

[Feature] Create basic UI and run animation for EV3 #2360

@laurensvalk

Description

@laurensvalk

The EV3 does not have a proper UI yet. Once pybricks/pybricks-micropython#388 is merged, the bluetooth system code will be properly separated from the UI. There will be functional HMI variants, such as hmi_lcd (nxt, ev3) and hmi_single_led (technic, move, city, essential), hmi_light_matrix (prime).

This has already been split, so we can start working on it. It still just implements the 5x5 light matrix UI for now, but can be modified easily. This means we can also keep a static framebuffer for the UI there if we want to. I would like to propose the following simple UI to get started.

     example.py
     -----
 >   hello.py
     -----     
     -----    

You would use the up/down buttons to move the selection > up and down. Other visualizations to indicate selections are also fine.

This is functionally equivalent to what we have already, just visually displayed with text instead of 5 blocks.

Unused slots should be selectable (so > ----- ) since that is where the program will be downloaded to.

To get the names, we can add a hook to lib/pbio/include/pbsys/main.h such as pbsys_main_program_get_info(pbsys_main_program_t *program) with an implementation in bricks/_common/micropython.cto get the name from thempyblob. Seepbsys_main_program_validate` which is also a application specific hook.

In principle, someone can already start on this even if pybricks/pybricks-micropython#388 is not merged yet.


The part where we clear the screen or start visual run animations has also been moved to these respective UIs. This means we can think about the animations for EV3.

On SPIKE, we'll keep the animated square. I'm not opposed to keeping it on EV3, but we could do something different. It would be nice if the name of the current program is displayed next to it.


I think this UI will be good enough for the first alpha release. We can think about something more elaborate as we go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: EV3Issues related to LEGO MINDSTORMS EV3

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions