From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino Analog Signal Bluetooth

Hello,

 

I have been attempting to bring in a signal from a gyro that is plugged into an analog port in an Arduino Uno via Bluetooth for about a week now with very limited success. I am aware there are numerous threads on the topic, but none have been able to solve my problem.

My hardware is:

Toshiba Satellite laptop with Windows 10 (does not have a built-in Bluetooth modem)

A plugable bluetooth USB Adapter

Arduino Uno

Bluetooth modem (I have tried both an HC-06 with a baud rate of 9600 and a Bluesmirf gold with a baud rate of 115200 in all attempts)

VEX 1 axis gyroscope

 

After pairing the Bluetooth device with the computer, which added COM5 and COM6, I have attempted the following:

 

My first attempt, and preferred method, was using Linx. I uploaded the Linx firmware to the Arduino using the Linx firmware wizard and a USB connection. Using the 1-channel analog read example, I confirmed I would receive the desired information through a USB connection. I then added baud rate override control and tried Bluetooth. I received either error 5003 or an error about the firmware version and the API. I tried adding Bt2 functions, but I didn’t make any progress.

Searching for alternatives, I noticed this was done using LIFA. I uploaded the LIFA hardware onto the Arduino and loaded the Arduino Analog Read Pin example program. Once again this worked perfectly though a USB connection, but did not function at all through Bluetooth connection (The program would stall at the init function).

I then used Bluetooth functions available in Labview and some threads as reference to attempt a solution. I could successfully determine the address and uuid, but I could not get any further. The most common error I received was the address was ill-formed.

Next, I used the Arduino to simply print the values (using the serial.println function) and I would just attempt to read the values and not fully interface with the Arduino. Using the serial monitor in Arduino I could see the values over the Bluetooth connection. Everything was responsive. I then checked this using Tera Term. Again, everything was acceptable. Finally, I used serial and visa functions to attempt to see these same values in LabVIEW. Some values read, but they are mostly unresponsive to changes with the gyro. This also occurs through a USB connection. I have attached this VI, but it is my least desired solution and given that it doesn’t even work with a USB connection, it may not be a good starting point.

 

Thank you for any help.

 

0 Kudos
Message 1 of 2
(2,891 Views)

Hello,

 

If I understood correctly, in the example you just sent you can read the correct values using some serial monitor (like Tera Term)?

 

Can you also send the Arduino code?

 

Marcin

              

Think Dataflow - blog.mtapp.tech
0 Kudos
Message 2 of 2
(2,833 Views)