Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with arudino and labview/linx.

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.

Download All
0 Kudos
Message 1 of 5
(702 Views)

You have not described your problem.  What is not working and what have you tried?

David Wilt
The New Standard LLC
0 Kudos
Message 2 of 5
(676 Views)

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.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 3 of 5
(675 Views)

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 😅

0 Kudos
Message 4 of 5
(648 Views)

@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 WriteLINX Digital Write

 

Checkout this link for an explanation of the VI and to see the boolean input I am referring to.

David Wilt
The New Standard LLC
0 Kudos
Message 5 of 5
(642 Views)