In stock
View Purchasing OptionsProject update 7 of 8
Hello backers,
It has been a while since the last update and we are really grateful for your patience.
Today, we would like to introduce you to the free BlueIOTerm mobile app, which can function as a UART serial port terminal when pairing with a BlueIO832Mini board.
One of the highlights of the BlueIO832Mini board is that the pins are configurable using our free mobile apps (Fig. 1). These pins can be configured as UART, SPI, or I2C interfaces depending on your use cases. Accordingly, serial interface-over-Bluetooth LE (BLE) is an important application of BlueIO832Mini, allowing UART/SPI/I2C data streaming between the users’ mobile device and the target device connected to the BlueIO832Mini.
Fig. 1. BlueIO832Mini's pins are configurable via mobile app
In this update, we would like to demonstrate the BlueIOTerm mobile app working as a UART serial port terminal application on a mobile device. The app is similar to desktop applications such as CoolTerm, TeraTerm, etc. It allows users to remotely communicate with a target device connected to the BlueIO832Mini via a UART interface (Fig. 2).
Fig. 2. UART-BLE bridge using BlueIOTerm and BlueIO832Mini
In what follows, we demonstrate two examples combining BlueIOTerm and BlueIO832Mini:
BlueIOTerm is available for smartphone and tablet. Users can scan the following QR codes to directly download and install a BlueIOTerm version compatible with their devices.
BlueIOTerm for iOS
BlueIOTerm for iPadOS
Note: The Android version of BlueIOTerm will be available soon.
In this scenario, users can utilize the BlueIOTerm mobile app, via a paired BlueIO832Mini, to exchange data with CoolTerm.
The setup for this use case is abstracted in Fig. 3. The steps are as follows:
Fig. 3. BlueIOTerm and CoolTerm serial port terminals
Fig. 4. Connecting BlueIO832Mini with a USB-UART adapter
Fig. 5. Setting UART's parameters in CoolTerm
Turn on the Bluetooth® feature in the user’s mobile device.
Open the BlueIOTerm mobile app. The main user interface (UI) is shown in Fig. 6.
Fig. 6 shows the three steps for connecting the app with a BlueIO832Mini.
Tap the “SCAN” button to search for any existing BlueIO832Mini devices. If a BlueIO832Mini is found, the app displays “BlueIO832Mini” in the Select Device section.
Tap the “Select device” window to select another BlueIO832Mini or
Tap “Connect” to connect the app to the chosen BlueIO832Mini.
Fig. 6. Main UI of BlueIOTerm. Search for and connect to a BlueIO832Mini with BlueIOTerm
After pairing BlueIOTerm with the selected BlueIO832Mini, the user can send and receive data between the app and the target device, which is the CoolTerm app in this demo. BlueIO832Mini works as a BLE-UART bridge between BlueIOTerm and CoolTerm.
Fig. 7 illustrates the usage of other buttons in the BlueIOTerm app. From here, the user is able to send/receive data to/from the target device. {blueioterm-buttons}
To change the UART parameters, tap “Setting” to go to the UART configuration setting menu. The UART parameters shown in the menu are the current settings (Fig. 8).
Fig. 7. Change UART parameters in BlueIOTerm
The combination of BlueIOTerm and BlueIO832Mini can also be utilized for wirelessly interacting with a MicroPython interpreter running on a remote target device. This improves users’ convenience. For example, users can attach a BlueIO832Mini to a target device hosting MicroPython interpreter, and leave this combo on their office desk. Then they can write MicroPython code and test it on the target device with BlueIOTerm while sitting anywhere in their work-space. Furthermore, if the target device is connnected to LEDs and/or sensors, the user can remotely control them by sending code to the MicroPython interpreter.
Users will need two pieces of hardware for this setup:
User will connect the BlueIO832Mini to the target device via UART interface. The UART pins of BlueIO832Mini are shown in Fig. 1. The pin configuration for the IBK-BLYST-NANO board can be found at I-SYST. The system is powered by a 3.3V power supply (Fig. 8).
Fig. 8. A BlueIO832Mini connected to a target device running MicroPython
The steps for interacting with MicroPython interpreter via BlueIOTerm are as follows:
Pair the BlueIOTerm with the BlueIO832Mini board. The steps are the same as steps 1-3 in the previous section.
Reset the MicroPython interpreter by resetting the target device. Typically, for the IBK-BLYST-NANO board, tie the Reset pin to ground (GND) and release it. BlueIOTerm will then display as in Fig. 9.
Fig. 9. BlueIOTerm shows MicroPython after being reset
Note: The user can trigger a soft reset for the MicroPython Interpreter by sending a "Ctrl+d" key combo to the interpreter. To do that, the virtual keyboard can be used.
Now, users can type Python code into the "input text" section and send them to the MicroPython interpreter for execution. The input code and the execution result are shown in the displayed section (Fig. 10).
Fig. 10. BlueIOTerm shows MicroPython after being reset
import board
x = board.LED(1)
x.on()
Fig. 11. LED1 lit
x.off()
In this scenario, users prepare a Python script in a file, and send it to the MicroPython interpreter for execution.
import time
import board
LED1 = board.LED(1)
LED2 = board.LED(2)
LED3 = board.LED(3)
def LedOn(idx):
if idx == 1:
LED1.on()
elif idx == 2:
LED2.on()
elif idx == 3:
LED3.on()
else:
print("Wrong LED id")
def LedOff(idx):
if idx == 1:
LED1.off()
elif idx == 2:
LED2.off()
elif idx == 3:
LED3.off()
else:
print("Wrong LED id")
def LedDance():
for i in range(1,4):
LedOff(i)
x = 600
for i in range(10):
LedOn(1)
time.sleep_ms(x)
LedOn(2)
time.sleep_ms(x)
LedOn(3)
time.sleep_ms(x)
LedOff(1)
LedOff(2)
LedOff(3)
x = x - 50
Switch the MicroPython interpreter to "Paste" mode (Fig. 12). To do that, we take the following steps:
Fig. 12. MicroPython interpreter in paste mode
Fig. 13. Send a MicroPython script to the target device
Enter "Ctrl + d" to finish pasting the script and to exit the paste mode. The interpreter will execute the Python script thereafter (Fig. 12).
Now, we can execute the LedDance()
function in the script by entering "LedDance()" into the input text. We can see the LEDs status in the following video:
Have fun playing with BlueIOTerm and BlueIO832Mini!
The BlueIO team.
BlueIO832 Mini is part of Nordic Community Hub