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: 

How to use expander outputs?

Hello Everyone,

I am quite new in LabView environment and I have a small problem. I am making a piano/keyboard using Arduino (I am using Linx firmware). Nothing complicated, I just want a sound to be played when I'm pressing a button. I managed to do that with Arduino outputs, but I have no idea how to use these from expander (I've got PCF8574). I have attached file with my program, so you could know better what I am struggling with.

0 Kudos
Message 1 of 4
(2,563 Views)

What are you talking about when you say "expander"?  I'm sorry but that is not a LabVIEW term.

0 Kudos
Message 2 of 4
(2,532 Views)

By expander I mean an I/O expansion by way of the I2C interface I am using for arduino.

0 Kudos
Message 3 of 4
(2,508 Views)

Sorry, I don't have linx installed at the moment. I would also recommend to ask these kind of questions over in the Linx forum at the LabVIEW maker hub

 

To only act on a FALSE-TRUE transition, you don't need a stack of two case structures. Just do a logic operation on the current and previous boolean (you can even use "larger than", i.e. if the new value is larger than the old value, then ...). A feedback node instead of a shift register would eliminate long wires and keep the logic more localized.

 

Is this code running natively on the arduino? When you read the I2C, you get an array of U8, so you just need to find out how the data is encoded in there. To answer the question on the diagram :"How to get this block to give me possibility of previous Read blocks?", you would again use a feedback node and e.g. compare the current U8 array to the previous reading. 

0 Kudos
Message 4 of 4
(2,497 Views)