03-02-2018 09:55 AM
I have a requirement to connect to two Blue Tooth peripherals - one at a time - based on specific requirements.
The peripherals are simple HC05 / 06 modules connected to an Arduino each.
The attached code does this function well - though i am not sure if this is the right way to do it ! ( This is just sample code only for the BT. Otherwise there are lot more functions to handle )
But i have a problem : For this to work it is essential that both the peripherals are powered before i start the VI. This is not how it will be in real time - both the peripherals are battery powered and i cannot afford to keep them powered indefenitley !!
What i want to do is : Start the BlueTooth server on the VI and leave it running and link up when the peripheral comes on line. After all this is how all cell phones work - once the BT is enabled, it connects to any paired peripheral when it is powered.
Solved! Go to Solution.
03-02-2018 09:05 PM
Hmmm... I see that the outer loop is a stupid idea. Will remove it and work on a single loop with both BT instances inside that with selective calling and restarting when the Error node returns a fault.
Maybe a shot of Scotch will help !!
03-04-2018 01:43 AM
Ok so the issue is resolved.
The attached VI will do all what I planned to :
1. Selectively connect / disconnect to a BT Module that is sending data based on a FP switch.
2. If the User clicks Connect without powering up the module it tries to connect once every 5 seconds without throwing a fault.
3. If the BT module goes off line when connected, the code tries to auto reconnect once every 5 seconds.
( The BT module was a HC05 driven by a Arduino Nano PCB sending millisecond data once every 100ms )
03-07-2021 07:22 AM
bonjour, je peux vous contacter pour savoir comment vous avez fait la communication bluetooth hc05 avec labview