Hey there, I am quite new so please bare with me if there is already a topic out there I just couldn't find or this may not be a proper space to ask for a different kind of device.
I recently purchased an AT-09 with HM-10 Firmware/Hardware to use with my MicroBit, as I wish to use it for many kinds of remote controls for sending it commands by tapping buttons. However, the AT commands on this module are always responding with "ERROR ". The PIN Out of the Micro:Bit is using these pins and their connections:
The code I programmed is a simple "AT\r\n" serial string while putting the KEY/EN from Low to High before sending the command. All I receive is an ERROR string... no error code or anything else, just ERROR. I am using a BAUD Rate of 9600 and to the specified pins. Just wondering if anyone has the additional knowledge they don't mind sharing. (If anyone has some GitHub Libraries that help me properly program this with a Micro:Bit, that would be amazing! I do have an Arduino UNO but I will need to get a new cord for it since it broke
Again, I am new to using this little powerful module. Any kind of tips is very much appreciated! I will be trying a few more ways and research a little more through the web too.
I moved your topic to an appropriate forum category @mintyboi.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
HM-10 is in AT mode by default and does not need a signal on the EN pin. The pin may not be connected anyway.
If your micro bit is like a Uno, it is likely that your problem is that Bluetooth needs to be used with software serial and moved to other pins. See the Martyn Currey website.
The BBC micro:bit is like the Uno R3 in that it has a dedicated USB interface chip separate from the primary microcontroller the user's application runs on. However, it is different from the Uno R3 in that pins 0 and 1 are not connected to the UART interface on the primary microcontroller (in fact, the UART isn't broken out at all on the micro:bit).
I am indeed using Microsoft’s website, MakeCode. I normally do Python with this online tool but even I have tried the little blocks before and doesn’t seem to change anything unfortunately…
The Micro:bit is very flexible with the pins becoming into serial pins. You can even use the USB Data lines with serial, although I am unsure if it switches to UART or it still communicates with TTL…
Main reason why I have thought of trying this with a Micro:Bit is because, foremost, I have quite a few lying around and wanting to make a good use of them. I am aware that they do have Bluetooth on-board but it has been very buggy with some apps I use, while the rest are completely unusable. Plus, I wish to make a connection to another Micro:Bit that way it can communicate to my files with USB communication and get the data it needs. (Useful for logs or event changes)
It seems like, telling by the comments of the post, I may need to update the driver or board itself. Although I do not have an actual TTL to UART converter or even a Windows OS enabled computer of my own. All I have is Linux and a Raspberry Pi 4.
Does anyone know by chance that it’s possible to flash the AT-09/HM-10 through a Raspberry Pi 4 without TTL > UART Adapter? Is it possible to flash directly through the GPIO pins on the Raspberry Pi 4? If it’s not possible then I may need to buy an adapter myself, but I will look further more into hopefully finding another solution.
It’s mainly because I found out that it might not be the micro-controller I’m using. It might be the actual firmware of the Bluetooth Module. Sorry for drifting off topic if I may have done so. I’m referring to “Flash” the Bluetooth Module as actually updating its firmware. The comment itself was actually just a summary of ideas I came up with to try out and to see if any of the ideas could be possible. Again, sorry if it’s confusing.
OK. There is an everlasting thread hereabouts on this matter. It is all about upgrading the instruction set in the cheapo HM-10, and I understand it uses an Arduino to do it. I therefore conclude you can do the same thing with a Raspberry Pi.
Sorry for days worth of a delayed reply, but I have looked at some ways to update the Bluetooth Module through the Raspberry Pi (4) although, most of the videos and articles I found were using the same way as if I had a UART to TTL converter (the USB Dongle). Is there a Raspberry Pi or Arm Linux software out there that works with the GPIO pins that is at least easy enough to install and maybe even without messing up with the root commands? (I know it requires root (sudo) to use the GPIO pins) I wonder if I’m missing something critical here…
I'm afraid I cannot comment any further than alluding to the thread about upgrading the HM-10 hearabouts. I haven't done it myself and I doubt it's worth the effort. I rather feel that the only people who might actually need an HM-10 are those who have inflicted themselves with iPhones.
I understood that the Raspberry pi worked similarly to the Arduino, but I may be wrong about that.