0

Controlling a 32x32 LED board with an Arduino in LabVIEW LIN
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Controlling a 32x32 LED board with an Arduino in LabVIEW LIN

by Fiona on Tue Jan 16, 2018 7:12 am

Hello,

I hope this is the correct forum for my question. I recently purchased a 32x32 Adafruit LED board which I am trying to control with an Arduino Uno through LabVIEW LINX. Ultimately, I will need the board to light up one LED pixel at a time, row by row scan.

As an initial test, I'm trying to simply light up a full row (or the 32 individual pixels of a row - I don't know yet what the code will do!), and continue row by row. I'm trying to select only red light at the moment.

I'm basing the LabVIEW code on the information I got from the Adafruit manual as to which pins on the Arduino control what. This is summarised in the top yellow box.

Without even looking too much at the LabVIEW code (unless you are familiar with it, in which case any tips would be great as I'm only starting out!), the error I received from LabVIEW is that the Arduino Uno does not support analogue output, which I believe is needed to selected a row pair on the board. If this is the case, why does the manual say to plug in the row selection into the A0 - A3 pins on the Arduino?

I'm attaching a picture of my LabVIEW code if that helps.

Many thanks in advance for any help!

Fiona
Attachments
LabVIEW Code.jpg
LINK LabVIEW code to control the Arduino
LabVIEW Code.jpg (319.22 KiB) Viewed 304 times

Fiona
 
Posts: 13
Joined: Tue Jan 16, 2018 7:00 am

Re: Controlling a 32x32 LED board with an Arduino in LabVIEW

by adafruit_support_mike on Wed Jan 17, 2018 12:51 am

The Arduino Uno accepts analog input. Pins A0 through A5 are connected to an analog-to-digital converter inside the microcontroller.

The Uno doesn't have a digital-to-analog converter that would produce DC voltages in the 0V-5V range though. It can simulate analog output on some of its digital pins with PWM waveforms with 256 possible duty cycles, and that's what the analogWrite() function does.

The PWM pulses have a frequency of about 490Hz. You can filter that to get something closer to a true analog voltage, but a filter slow enough to do that would also be slow to respond when you wanted to change the voltage for real.

If you need a true DC voltage, it will probably be easiest to use an external DAC like the MCP4725:

https://www.adafruit.com/product/935

adafruit_support_mike
 
Posts: 52013
Joined: Thu Feb 11, 2010 2:51 pm

Re: Controlling a 32x32 LED board with an Arduino in LabVIEW

by Fiona on Mon Jan 22, 2018 6:54 am

Thanks very much for clarifying this! I had been unable to address the A0 - A3 pins in LabVIEW as it could recognise that they are not true analogue pins. By using a digital Write function in LabVIEW and channel labels, 14, 15, 16 and 17, the problem has been resolved. Thank you for your help with this.

Fiona
 
Posts: 13
Joined: Tue Jan 16, 2018 7:00 am

Re: Controlling a 32x32 LED board with an Arduino in LabVIEW

by adafruit_support_mike on Tue Jan 23, 2018 12:15 am

Glad to hear you got things working!

adafruit_support_mike
 
Posts: 52013
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.