07-10-2013 08:22 AM
I've looked up at many discussions here at the LabVIEW for Arduino forum about this issue with the Arduino mega pins, but I haven't been able to solve it. I'm working on a project that has many sensors, to read them I'm using multiplexers and, for convenience, I would use the bottom digital pins of the board to not create a mess in the circuit. Is there any way I can make all the pins from Arduino mega available? I want to use the whole board (Analog in A0-A15; Digital I/O D0-D53).
I appreciate your patience.
Solved! Go to Solution.
07-10-2013 12:01 PM
All pins are already available. Is there a particular error that you are getting?
07-10-2013 12:25 PM
Is not an error, is just that when I want to choose an specific pin that goes out of the range in the Arduino UNO I can't. Let me give you an example, the way my circuit is assembled it would be ideal for me to use the digital pin number 22 in the board, but when I create a digital pin on LabVIEW I can choose only between 0-13 no more than that, even if I choose the Arduino Mega as a board. Is this normal? Should I just make a constant in the pin and say it is the output 22?
07-10-2013 12:33 PM
When you set the board type to the Mega, it will allow you to use pins 2 through 54 (digital) and pins 0 through 15 (analog). If you are unable to figure it out, attach your VI to your post and I will take a look at it.
07-10-2013 12:49 PM
The VI is attached, Nathan. Thanks a lot. I really appreciate your help.
07-10-2013 02:16 PM
There are several issues with your code:
What multiplexers are you using?
EDIT: I just realized that the default type defs for the pin numbers is only for the Uno. I never knew this because I've never used those type defs before. You can simply input a U8 for the pin number. I always hardcode these as constants (U8s) on the block diagram. (This is the answer to the title question)
07-10-2013 02:50 PM
Thanks a lot, Nathan. I just started using the LabVIEW, that's why I've missed so many things in the code. I'm using a MPC506 of 16 channels from Texas Instruments. I appreciate your help.
05-02-2019 02:14 PM
I know this is 2013. I don't care, this is not a solution. This is still unsolved tons of people everywhere asking this same question. If you have LINX and a mega you how the hell can you use the 15 analog pins like you can with digital. Why can't you just wire pin 54 to the digitalWrite peripheral? Did the makers of LINX never pick up an Arduino in their life?