HM-18 Module installs with the same pins as the HM-10 module. It’s advertised as BLE 5.0, and mine arrived with firmware v116, and there doesn’t seem to be an update for this module on the manufacturer’s website(http://jnhuamao.cn/download_rom_en.asp?id=1).
Like the HM-10, it is configured using AT commands, and has only two modes; iBeacon and a proprietary UART service. The AT commands can configure the module for lower-power and sleep modes. Gordon has posted iBeacon JS code at: http://forum.espruino.com/conversations/252971/
I initially wired up a button and pull-up resistor to the System Key, pin 23. According to the data sheet, pulling to ground either disconnects a connected module or resets to a default configuration if already disconnected. Power cycling the module also disconnects, so I removed the button.
I’ve configured a surface mount LE and 1206 resistor to shine through one of the board’s through-holes. Clear nail polish insulates the connections from the board, and the board still lays flat on a surface. The LED blinks when not connected, and stays on when connected.
A simple script to control the on-board red LED can be controlled via the nRF Connect app to verify operation.
function onInit() {
USB.setConsole();
}
Serial1.on('data', function(data) {
if (data=="o") LED1.write(true);
if (data=="f") LED1.write(false);
}
);
Pretty nifty that a $5 add-on adds BLE communication to the versatile classic Espruino board!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
HM-18 Module installs with the same pins as the HM-10 module. It’s advertised as BLE 5.0, and mine arrived with firmware v116, and there doesn’t seem to be an update for this module on the manufacturer’s website(http://jnhuamao.cn/download_rom_en.asp?id=1).
Like the HM-10, it is configured using AT commands, and has only two modes; iBeacon and a proprietary UART service. The AT commands can configure the module for lower-power and sleep modes. Gordon has posted iBeacon JS code at: http://forum.espruino.com/conversations/252971/
I initially wired up a button and pull-up resistor to the System Key, pin 23. According to the data sheet, pulling to ground either disconnects a connected module or resets to a default configuration if already disconnected. Power cycling the module also disconnects, so I removed the button.
I’ve configured a surface mount LE and 1206 resistor to shine through one of the board’s through-holes. Clear nail polish insulates the connections from the board, and the board still lays flat on a surface. The LED blinks when not connected, and stays on when connected.
A simple script to control the on-board red LED can be controlled via the nRF Connect app to verify operation.
Pretty nifty that a $5 add-on adds BLE communication to the versatile classic Espruino board!