Modules provide a way to access standard functions from the brick like motors, sensors and the screen.
The module command can be used to call blocks from your wheel code.
Each module has a unique numeric id. The VM calls the module based on the id passed.
Within a module procedures can be called. The addr command can be used to let the src register point to
a block of data which can then be used by the module.
The following example shows a call to the light module, the src register is pointed to the color variable.
proc light(number color, number pattern) addr color mod MODULE_LIGHT, LIGHT_UPDATE end
Wheel comes with the following standard modules:
Module | Function |
---|---|
Bit | Bit functions |
Button | Read the EV3 buttons |
Device | Select EV3 or Powered Up |
File | Reading and writing files |
Light | Control the EV3 light |
Math | Math functions |
Motor | Control EV3 motors |
Powered Up | Control EV3 motors |
PSP | Psp controller functions for EV3 |
Screen | Drawing functions |
Sensor | Read and configure sensors |
SensorMulti | Sensor multiplexer for EV3 |
Sound | Play tones or samples |
Standard | Core functions |
String | String functions |
System | System functions for EV3 |
To build your own interfaces to control robots from the IDE there are several component modules available.
Input components:
Image | Module | Function |
---|---|---|
Button | Buttons | |
SelectButton | A horizontal list of buttons | |
Checkbox | Checkbox | |
Radio | A radio group | |
Dropdown | Dropdown |
Text components:
Image | Module | Function |
---|---|---|
Label | A label and value text | |
Title | A title text | |
Text | A text block | |
ItemList | A list of items with buller points |
Panel components:
Image | Module | Function |
---|---|---|
Panel | A panel which can contain components | |
Tabs | Tabs with tab panels |
Graphics components:
Image | Module | Function |
---|---|---|
Rectangle | A rectangle with an optinal border | |
Circle | A circle with an optinal border | |
Image | An image | |
Icon | An icon with a list of icon options |
Status components:
Image | Module | Function |
---|---|---|
StatusLight | A status light | |
ProgressBar | A horizontal progress bar | |
LoadingDots | Animating loading dots |
Device components:
Image | Module | Function |
---|---|---|
PoweredUpDevice | Displays Powered Up port information | |
EV3Motor | Displays EV3 motor port information | |
EV3Sensor | Displays EV3 sensor port information |
Dialog components:
Image | Module | Function |
---|---|---|
AlertDialog | An alert dialog | |
ConfirmDialog | A confirm dialog |
Non visual components:
Image | Module | Function |
---|---|---|
Interval | Schedule a repeating event | |
Timer | Scedule an event |