LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW+Bluettoth

Highlighted

Hi, 

 

i am trying to make a bluetooth communication with my RN42 module and LabView. I have attached the VI with this message. And my arduino code is:

int digPin=9;
void setup() {
pinMode(digPin, INPUT);
Serial.begin(9600);

}

void loop() {

//c=digitalRead(9);
if(Serial.available())
{
//char c = digitalRead(digPin);
char c = analogRead(digPin);
Serial.write(c);
//Serial.write(1);
Serial.print(1);
delay(100);

}
}

 

I am not able to communicate to my Bluetooth module. Can someone please help me with this.

 

Thank you.

 

Regards,

Supreet Juneja

0 Kudos
Message 1 of 2
(1,245 Views)
Highlighted

What problem are you having / what errors are you getting? Have you verified that your bluetooth is actually connected?

 

(One thing I noticed about your screenshot - generally it is better to use a termination character (e.g. 0xA) in your serial code (e.g. using println) and then use that in your LabVIEW code instead of using bytes at port. Bytes at port might return fewer bytes than you have available.

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