LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing LED using Arduino and LABVIEW

Hello,

My LABVIEW code is quite Simple. The basic idea of my project is to power 120 LED's (4 rows and 30 Columns) I use arduino to control 34 switches (each swicth controls a single row or a column).
Ive written a LABVIEW code (using a boolean function) which allows arduino to give out 5V or 0V (this powers the switch) which inturn lights the rows/columns. (circuit attached)

I am using an Arduino Mega 2560. Pins 13 through 6 on the arduino powers the rows (each row has 2 swicthes, hence the 2 respectively for each switch). Pins 22 through 51 power the columns.

Labview1.jpgLabview2.jpg

I was wondering if I am in the right track with the code? LABVIEW does not give any errors (broken Arrows) But wanted a conformation before I go to the next step

Thank You.

0 Kudos
Message 1 of 3
(3,966 Views)

The thing that I notice that will cause issues is the baudrate.  The Arduino Mega defaults to 9600 in the firmware.  So, you need to set it to 9600 in LabVIEW also.

You can double the speed of your code by moving all of the "Set Digital Pin Mode" VIs in front of the while loop.  I created a VI to set all of the pins to outputs if you would like to make your code smaller (attached).

0 Kudos
Message 2 of 3
(3,486 Views)

Thank You, It works.

0 Kudos
Message 3 of 3
(3,486 Views)