LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Barometric Pressure Sensor - BMP085

I don't open .rar files.  Please post a .zip file.

0 Kudos
Message 41 of 53
(1,366 Views)

Mehr,

a couple of points:

1- I think your .rar file has a few sub-vis missing

2-From what I can see!!, you open serial communication inside a loop that has no wait for serial comm and also, I think you would have a better luck with Mega if you use 9600 as the baud rate.

Check your logic within the first loop.

Regards

Barddya

0 Kudos
Message 42 of 53
(1,366 Views)

new .zip file added
thanks Nathan_B

0 Kudos
Message 43 of 53
(1,366 Views)

thanks barddya
missing files are just some pdf files and not important for vi.
i have remove loop and iwill try 9600 buad rate
but i get valied data from x & y axis of bmp5883  but unvalied data from z axis and bmp085 and no data from itg 3200 in same loop.

0 Kudos
Message 44 of 53
(1,366 Views)

The first thing that I will recommend is to look at the examples provided with a sensor's library to see how to use the VIs.  Also, the default baudrate of the Arduino Mega 2560 is 9600 so you must use this value for Init.vi.

The ITG3200 VIs, I can't really comment because I've not tried to work with one of those.

I've attache my version of your VI to see how I would do it.  However, like I said, I can't guarantee anything about the ITG3200.

0 Kudos
Message 45 of 53
(1,366 Views)

Thanks nathan_B
itg3200 dont work and i have disable it in my block diagram
now i have new problem except that.
i get data slowly i need real time data.
when i read one sensor from i2c it work real time and fast but when i use more it get slow!
what should i do/?

0 Kudos
Message 46 of 53
(1,366 Views)

Well, I guess that depends on how slow you are actually talking.  Because the Arduino Mega needs to use a baudrate of 9600, it will be slower than an Arduino Uno that can use 115200.

So, first I must ask if you change to the 9600 baudrate in your VI.  Did you try each of the different I2C devices individually to see if one of them is causing it to be slow?  What happens if you try to read the same sensor twice in the loop (each on going to a different indicator), does it slow down like you are experiencing currently with multiple I2C devices?

0 Kudos
Message 47 of 53
(1,366 Views)

i use latest code that you send for me nathan in your post.
it has 9600 buad rate.
there is no change from your code.

0 Kudos
Message 48 of 53
(1,366 Views)

Mehr,

In my previous post, I mentioned that some files are missing and by missing files, I meant ITG VIs. Still even if I had ITG files it Would not have made much of difference since I don' have the hardware.

Nathan's Modification should work better.

But let us look at it from a different point of view

You say two of the three values are correct. Here is what I would do:

1- use nathan's version and and collect several data set

2- analyze the data that is not good. There are 2 important points that one may be  looking for

          a— data is randomly produced. What I mean here is that you can not find any pattern on the the sets of data you believe to be incorrect. This may indicate issue with the hardware

           b) The sets of data exhibit certain pattern ( off by a factor, or the speed by which you move the device and required time to settle. etc) In this case you verification method may require a closer look)

Regards,

Barddya

0 Kudos
Message 49 of 53
(1,366 Views)

thanks barddya

yes my board & sensors have some problems

i use new sensor mpu6050 with hmc5883
now i get correct data from both of them withouth delay. but i think they need to be calibrate.is it true?

0 Kudos
Message 50 of 53
(1,366 Views)