08-04-2017 06:33 PM
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.
08-04-2017 09:33 PM
What are you talking about when you say "expander"? I'm sorry but that is not a LabVIEW term.
08-05-2017 07:49 AM
By expander I mean an I/O expansion by way of the I2C interface I am using for arduino.
08-05-2017 09:50 AM - edited 08-05-2017 09:53 AM
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.