I am trying to make a simple app with MIT app inventor where it sends a string to an arduino through a HM-10 module. I am using the official Bluetooth low energy extension in MIT app inventor.
The app is able to successfully connect to the HM-10 module (the light stops flashing, indicating it has successfully connected). The HM-10 and arduino are definitely able to receive data, as I tested using the lightblue app and successfully received a string. However, when I use the app inventor app it never receives any string. Any help or guidance would be very much appreciated!
I am using version 20240822. If I don’t use the make a list block it gives me this error: [NSTaggedPointerString count]: unrecognized selector sent to instance 0xb51d83a286c45fe5. Irritants: ()? Thanks for your help!
Never seen that error ( don’t know what it means ).
I’m using the following test app to connect to an esp32 ( onboard bluetooth ), it should work with hm-10 too:
adjust uuids as needed
start scanning and connect
pressing on/off buttons the corresponding string are sent
P.S.
sometimes my ( old ) phone does not connect and need to reboot it, generally find bluetooth classic easier than ble ( esp32 support both ), in your case you need an hc-05 or the like
Well, your Arduino Script is for Classic BT and your App Inventor Block Code is for BLE.
Plus, there are fake HM-10 Modules on the market (manufacturer should be Jinan Huamao Technology Co., Ltd. 济南华茂科技有限公司) - so that needs checking too. Note that HM-10 only supports BLE v4.0, the first and worst version of BLE.
Concerning the Classic/BLE mismatch, they are technology related and so you can get away with very simple cross-code but I wouldn't recommend doing so. There are copious examples of good practice on this Forum, just search, but first decide if it is to be BLE or BT.