LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

write and read to arduino at the same time

Solved!
Go to solution

Hi there people

I have this lab project where I control a servo through LabVIEW 2010 and arduino UNO REV3. The thing is to sample values from arduino' s analog input 0 (I have connected a photodiode), every 5 degrees of servo's position and make a table of sampled values vs degrees.

I know  there are two VI arduino examples in LabVIEW: Arduino Servo VI and Arduino Photocell VI (which I tried separately) but I can' t combine these two together. Please help me.

0 Kudos
Message 1 of 3
(4,706 Views)

TomPap,

I recommend looking into the State Machine Architecture and Producer Consumer Architecture.

Post some code and we'll see if we can point you in the right direction.

-Sam K

Message 2 of 3
(2,875 Views)
Solution
Accepted by topic author TomPap

It sounds to me like you might just be trying to initiate Arduino twice.  To write an angle an then immediately read a value from the photocell you need to do something like this:

write_angle_read_photocell.png

If you need special timing to make sure that the servo has finished moving then you would want to use one of the options given by Sam.

0 Kudos
Message 3 of 3
(2,875 Views)