1

Im trying to make a macro pad using Arduino Uno r3 and 4x4 matrix (cherry blue clone) . I know using a pro micro is better than uno cause there isn't HID compatibility in uno but since i already have one , i want to work with this . I have already tested the macro pad after compiling and flashing a keyboard.hex file . But wondering if i buy a bt module like HC-06 (which is about 3.2$ here ) would that be able to send inputs even aftar flashing ? I have like basics coding knowledge so i have no clue what flashing actually would do to the module so . Anyone know would making that macro pad BT compatible be possible or not ?

1 Answer 1

1

It is unclear to me, where you flashed what, so I will describe some basics.

The Uno cannot act as a keyboard/HID device, since the microcontroller on it (the Atmega328p) doesn't have native USB capability. For connecting to USB the Uno has a USB-to-Serial chip on it (actually another microcontroller, the Atmega32u4 I think). So with the Uno you only have a serial connection, unless you hack the Atmega32u4 and program it with your own firmware (firmware is a term for software, that runs very near to the hardware, in this case directly on the microcontroller, in contrast to normal software running on an operating system on a computer; so in the middle between hard- and software, thus firmware).

Flashing is the same as programming a microcontroller. It has this name, because the program is saved in flash memory on the microcontroller (that is a specific type of memory technology; the same technology, that USB sticks use for storing your data). Flashing the HC-06 means programming it with a different firmware.

All bluetooth devices use the same base technology (thought to be clear, BLE is a different technology). The role of the device depends on the characteristic/profile, that it exposes to the host. There are profiles for HID, Serial, Audio, ... .

The HC-06 is a bluetooth slave device, which acts as a bluetooth-serial-bridge (like the Atmega32u4 acts as a USB-serial-bridge). But this is a software limitation. The HC-06 has standard bluetooth hardware, but the firmware on it just gives you the Serial profile (in fact a HC-06 is mostly the same like the master device HC-05, just different firmware and corresponding breakout boards can break out other pins). So by flashing (programming) it with a different firmware, you can get different profiles. If you find a firmware, that gives you HID functionality, you can flash that to the HC-06 and use it. Though this is a bit hacky I think (haven't done it myself), so it might be a bit too much for a beginner.

Bluetooth Slave/Master: The bluetooth protocol uses fixed roles for the two connected devices. One is the master and one is the slave. The master controls, if the communication is really happening. For example a bluetooth headset is a slave device. You cannot connect the bluetooth headset to your bluetooth keyboard, because both are slave devices. You always need one master and one slave. The HC-05 is basically the same module as the HC-06, but it's firmware enables it do be master or slave (configurable by you). So some devices support both modes, but still in any specific connection they can only have one of the modes (need to either master OR slave at any time).

Anyone know would making that macro pad BT compatible be possible or not ?

Possible, yes. But I suggest you invest in buying a ready to use bluetooth HID controller (immediately found this one from adafruit, though you might might cheaper versions). That will be way easier, than directly jumping into flashing a HC-06. Though that is still a possible path to go.

Another way to go would be to just use the serial functionality and write a small program for your PC, which reads from the Serial interface and issues key strokes according to the serial data. Then you don't need to reflash the HC-06.

5
  • Thank you chrisl for the valuable answer . I understand what you were saying .. somewhat . The thing is im from a third world country and there aren't any products from adafruit . Actually tinypico was a really good choice for my project but if i wanted to get one from AliExpress i would have to pay 20$+ on just shipping so the cost is too much . May 14, 2021 at 10:40
  • You can search for other product than the one from Adafruit. That was just the first, that came up, when I quickly searched for it. If there are no better/cheaper modules available for you, you need to compromise. Either going the steep learning curve to learn reflashing the HC-06 or by writing the program for your PC, that handles serial input.
    – chrisl
    May 14, 2021 at 11:03
  • " I understand what you were saying .. somewhat" - Can you pinpoint, what you are not understanding completely? Then I can try to improve my answer in that direction.
    – chrisl
    May 14, 2021 at 11:03
  • I didn't understood master-slave relation in the BT module . Its because i haven't done any research in that matter . So instead of bothering you i just wanted to do some study on that matter :) again ,thank you very much for your answers , now i know what i need to look into May 14, 2021 at 11:10
  • I added a short paragraph about this to the answer. For now I leave the rest for you to research :D If you think my answer is correct, then you can accept it. That marks the question as correctly answered.
    – chrisl
    May 14, 2021 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.