The Monitor & Control section of the iOS app, lets you interact with the micro:bit in real-time
- Display the data detected by the onboard sensors
- See what the LED screen is showing
- Check the status of the A & B buttons and input/output pins.
- Send messages to the LED screen
- Send commands to the output pins
Flashing the Monitor and Control Hex
The monitor & control services require Bluetooth services to be enabled in your program. The iOS app provides a sample: monitor-services Hex file with several of these services enabled and ready for you to use and you can flash this to the micro:bit from the Flash page.
Tap on Set to adjust how many panels you see per screen, between 1 and 4. Scroll up and down to see more panels. To adjust the position of a panel, hold your finger on the panel and drag it to a new position.
Tap the dots in the top left-hand corner to show the options for that panel.
To remove a panel, select Delete on the options menu.
Acceleration values are available in the three directions, x, y and z, as single values or a combined value. Tilt pitch and roll angle is measured as the micro:bit rotates about the x and y axes respectively.
Magnetic field strength values are available in the three directions, x, y and z, as single values or a combined value.
Compass. When the micro:bit is placed flat in a horizontal plane, the direction of the y axis is shown in degrees from north.
Before the compass function works, the following calibration process is necessary:
1. Hold and keep the micro:bit in a horizontal plane;
2. Tilt it in all directions until all the LEDs are lit.
3. When you see a smiley face, tap 'Calibrated.'
The ambient temperature on the micro:bit is shown.
There are four modes of use which you can select from the panel menu:
1. Monitor: The grid mirrors the states of the LEDs; whatever shows on the micro:bit LEDs appears in the LEDs panel.
2. Set: You may define a grid pattern by tapping cells in the panel, and the same cells will light up on the micro:bit in real time.
3. Set on 'Show': You may define a grid pattern which shows on the micro:bit when you tap 'Show'.
4. Set on A or B: You may define a grid pattern which shows on the micro:bit when you press buttons A or B on the micro:bit or tap their icons on the screen.
You can send text messages directly to the LEDs. The panel menu offers two options for prompting the messages:
1. Pressing buttons A or B on the micro:bit or by tapping their icons on the screen.
2. Tapping the 'Show' button on the screen.
A & B buttons
The button images mirror the state of the buttons on the micro:bit. You can also tap on the images to force the buttons to a 'pressed' state. (If the micro:bit is programmed to use button presses, you can in effect press the buttons remotely from your iPad or iPhone.)
You first need to define the pins you want to use as an input or output; move the cursor to a pin and tap it to show the menu for selecting the pin type. Digital and analogue options are available. (Alternatively tap 'Pin x' to select a pin and tap 'Not used' to select the type.)
The state of an input pin shows as a blue bar; a digital signal lights it fully; an analogue signal is shown by the length of the bar.
The state of an output pin shows as a red bar; For a digital output, tap on the bar to create or toggle an output signal; For an analogue output, tap the bar and drag its top to show the size of signal you want to output.
This is useful when you have programmed the micro:bit to take a photo using the camera on your iPhone or iPad. Your program may use the buttons to prompt camera action. Before you attempt to create a program, you need to add the 'Devices' extension to the editor menu. (On the MakeCode editor menu, find 'Extensions' in the 'Advanced' section of the menu and select the 'Devices' extension.) The sample file 'camera control' shows a suitable program.
This panel show the standard gamepad buttons, allowing you to use your iPhone or iPad as a gamepad controller. The program in the micro:bit must contain gamepad instructions from the 'Devices' section of the editor menu. The sample file 'gamepad demo' shows a suitable structure for a program.