01-19-2022 12:16 PM - edited 01-19-2022 12:19 PM
Hi,
four leds and two push buttons are needed for this problem. So i have to create a program that increases the number of lit LEDs with one button, and reduces it with the other button.
I have tried to do something, but my knowledge is not at that level yet.
Somebody can help me with this problem?
I have uploaded two screenshots showing the problem.
01-19-2022 05:01 PM
01-19-2022 05:06 PM
Hello RiffLord.
Your code is a little bit of a mess. Try to follow some guidelines for best practices.
https://www.ni.com/en-us/support/documentation/supplemental/06/rules-to-wire-by----part-i.html
it is more useful for us if you share your code for us to test. but looking at it, i can see that you are not writing anything at the digital write subvi.
I did not checked the rest of the code.
01-20-2022 10:43 AM
I'm new in LabView, so i dont know much. I tried to move an arduino code to Labview. I have to do a project, where i use 2 pushbuttons and 4 leds. One push button is responsible for increasing glowing LEDs, and other for decreasing glowing LED's. I mean if u click button1 then one Led is going to shine and click another one in button 1, then second LED will light up etc. But if u click button2 then the diode will turn off, and if u click one more at button2 then another Led will turn off.
I dont know how to read and write outputs on arduino. It is simpler for me when i do it on C++ where i can write just few lines of code.
I watched it looking for help: Digilent Physical Computing Kit for LabVIEW - 06 | Read Multiple Push Buttons - YouTube but he only programmed buttons by read function and i have to use write function too for turn on/off LEDs on contact plate.
I hope you understand, because im not good at english 😅
01-20-2022 10:52 AM - edited 01-20-2022 10:53 AM
@jorgemondadori wrote:
i can see that you are not writing anything at the digital write subvi.
This is the location he is referring to. You are not seeing any thing on your digital outputs because you are not writing a state. There should be an array of boolean input that define the state of the digital output channel.
LINX Digital Write
Checkout this link for an explanation of the VI and to see the boolean input I am referring to.