-
• #2
Personally I haven't, but if it has the same pinout for GND/3.3v/RX/TX then I imagine the only difference would be in the commands you need to send to it...
-
• #3
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!
-
• #4
For some reason I'm not able to embed images or attach them. Here are the links to the images in case anyone would like to see what I came up with:
https://github.com/wminarik/images/blob/master/1206Resistor_LED.JPG
https://github.com/wminarik/images/blob/master/HM18_LED.JPG
https://github.com/wminarik/images/blob/master/LED_BLE_Connect.JPG -
• #5
That looks awesome - thanks for posting up!
You say 'proprietary UART' - it's not the Nordic UART is it? If so you could then program Espruino with the Web IDE wirelessly - just like a Puck.js or other native Bluetooth LE device!
There are great instructions for adding a BLE 4.0 connection to an Espruino original board using the HM-10 module. Has anyone attempted to add a BLE 4.2/5.0 module such as the HM-18?
It uses a CC2640 combatible chip.