07-06-2022 03:53 PM
Hello all, while I have experience with LabVIEW itself I'm a complete newbie with what I'm about to talk about so I apologize if this seems odd. I work as a work study at a college I attend and I have been tasked with the following: To use two Arduinos talking to each other over a pair of HC05 Bluetooth modules to emulate a system for a patient glucose monitoring and insulin pumping system. One Arduino will be hooked up with a sensor that detects water level in a jar, this is meant to emulate how much insulin has been pumped. The other Arduino will be hooked up with a relay that will switch a pump on and off based on what signals it is receiving from the other Arduino.
I've used LINX before to set up a Boolean adder/subtractor with 2 7-segment displays (and thank you very much for being here for me to talk about that one as well, the comment I received on it really led me in the right direction) but that was all a matter of digital inputs and outputs in Boolean and analog outputs in voltages. I need something more than that for this.
Now, I know what you're thinking: There are Arduino IDE sketches that will accomplish this much easier than using LabVIEW. I've tested them myself, and they work. But my boss is insistent on a no-IDE solution. This is going to be presented at MNTeSIG conference at the end of the month, and everything needs to be just-so. So what I'm asking is: How can I use LabVIEW to initialize and communicate with Arduinos using HC05 modules? I'm currently using LabVIEW 2018 32-bit and Digilent LINX. If the answer lies in a newer version of LabVIEW, it would be possible to migrate to that. I'm open to any suggestions. Attached is what I've got so far trying to use UART, which doesn't work at all because I have no idea how to set that up. Also attached is a photo of the setup I'm using, with everything currently attached to one Arduino (except for the second HC05)
07-07-2022 08:33 PM - edited 07-07-2022 08:40 PM
The HC-05 needs to be configured (master/slave mode, serial communications protocol, etc.) using a terminal program like Terra-Term first before it will work with anything
Here's a link to the Serial Port Bluetooth Module (Master/Slave) : HC-05 Wiki
Once configured and paird with another device (even a computer with BT) it will become "transparent" and communicating between two HC-05 devices is no different than serial communication over wires.
Also don't believe what you read on the internet about these needing 3.3 Volts. Sure the HC-05 module itself does need 3.3 volts BUT the carrier board that they are most commonly mounted on for Arduino's and breadboard usually contains a 3.3 volt regulator and level shifting so it can be powered and work directly with 5 volt Arduinos.