Guides
Switch agent modes
Move between Normal, Plan, Teach and Debug in your tool, and turn on Debug mode for work on the board.
BMI270 driver tutorial · Part 3 of 5The running example: an M5Stack CoreS3 reading its built-in Bosch BMI270 motion sensor over I2C. Choose your tool below and every step and clip follows it. Start from part 1.
Four modes, one agent
The mode decides how Flash works on your request. You will use three of them in this tutorial.
| Mode | In this tutorial |
|---|---|
| Plan | Design the BMI270 driver without touching the code. |
| Normal | Implement and build the driver. |
| Debug | Program the board and check the readings. |
| Teach | Not used here: explanations and guided exercises. |
Switch the mode
In Flash IDE
- The mode pill under the chat input shows the current mode.
- Click it and choose Normal, Plan, Teach or Debug.
- Or type
/modefollowed by the mode, for example/mode plan.
Turn on Debug mode
Debug is the mode for work on the board: programming it, reading its output and using the debugger. Turn it on before you ask for any of that.
In Flash IDE
- Choose Debug in the mode pill, or type
/debug on. - Open the Debug workspace to follow the board’s output and the debugger.
In Flash
/debug on/debug status/debug offKeep in mind
If you ask Flash to verify something on the board without choosing a mode, it switches to Debug on its own.
Try it: plan the driver
Switch to Plan and ask for the design you will implement in the next part.
Ask Flash
/mode plan Plan a driver for the BMI270 on this board using the project's I2C setup. Include the configuration file it needs at start-up, the registers for acceleration and rotation, and how you will verify it on the board.