04-09-2017 01:19 PM
Hi everyone,
I want to send sequental "true-false" command by using digital write VI to arduino. I put LEDs on the front panel, I used local variable, the program seems to work properly, but cannot take any output voltage from digital output pins of the arduino. I attach the code, when you run, the lamps are fired as coded but digital write inputs ("output value" of digital write VI ) dont change when you control via a probe.
04-09-2017 01:24 PM - edited 04-09-2017 01:33 PM
Hi Cetin,
I used local variable
That's the problem! 😄
You did not THINK DATAFLOW!
Don't use local variables for this task, use something like a statemachine instead.
Even a simple FOR loop and autoindexing an input array with aour LED states would be fine! Replace your while loop by a FOR loop executing twice. Remove the sequence. Have an array constant with your LED values, autoindex this array.
Like this: