Micro:bit has a BLE interface which we could configure to work as UART service. In this example value of voltage on PIN P2 is transmitted via Nordic UART service present on micro:bit on every one second. When Bluetooth device is connected to micro:bit the connection icon is displayed on the LED display.
Here is located source code:
For receive the data from micro:bit you could use any serial Bluetooth terminal application which has support for Nordic UART. I have used a free Android application called: Serial Bluetooth Terminal.
Here is short video presentation:
This simple example could be extended by following things:
- adding a simple protocol with support for remote commands like: start/stop measurement or set measurement period,
- adding a simple resistor divider on input of PIN P2 to extend measurement range of voltage from 3.3V,
- adding input protection