How to implement wireless communication using arduino pro micro?

Using specially designed gloves, I use Arduino Pro Micro to control the computer cursor. Initially, I got data from the glove sensors, read and developed an algorithm in Arduino, and sent commands to the computer serially. That worked fine. Then, I became interested in wireless communication between Arduino and computer; for this purpose, I was using the Bluetooth module HC-05, but I observed a significant delay in implementation. In this wireless case, one part of my algorithm runs in VScode, which receives the data via Bluetooth and implements cursor control; here, I observed that just one left click takes 5 seconds to perform. I need suggestions in this regard. Where is the problem initially, and how should I tackle it?
Thank you

Try this link: How to get the best out of this forum - Using Arduino / IDE 1.x - Arduino Forum

How much time is "a significant delay" exactly?
How much delay (any form of communication has a delay) is acceptable?
There are lots of different wireless communication modules, also Bluetooth has evolved big time since the HC-05 which uses v.2 dating back to 2004, while the current v.5 came out in 2016 with the latest updates in 2021.
Do some research into those modules - less protocol overhead will mean less delay. Faster transfer speeds will mean less delay. However real world performance may differ, depending on how crowded the airwaves are in your location.

There must be something badly wrong with the code if it takes 5 seconds

Are your sensors digital or analog?
If they were digital I would change to use a ESP32-microcontroller which has bluetooth on board and can be used to emulate a BLE-keyboard

1 Like

That sounds utterly absurd and your problem can only lie with your code, apparently a secret, or your concept. HC-05 itself is entirely innocent.

Try different radio setups, and get just the radio communications working properly before continuing with the rest of the project.

Transmission/reception should be so fast that a human could not possibly detect a lag. Even the dirt cheap 315 or 433 MHz modules can do that very reliably, up to several hundred meters with clear line of sight.

Hi @mayaro ,

Welcome to the forum..

having some strange holidays, sorry..

how much data?? what is data??
maybe buffering, needing a flush??

how about a sample sketch with just sending the left click..

good luck.. ~q

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.