LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use Analog pin as digital pin Arduino

Hi there, 

 

Actually i am having problem, i need to use drive a stepper motor using A0 and A1 pins of the Arduino Mega ( and that's because i have a shield RAMPS1.4 so i can't change the configuration of the integrated circuit). 

I have tried to introduce the A0 and A1 as pin number 54 and pin 55 but it didn't work.

I was thinking about how to convert or how to use analog pins as digital pins? 

Looking forward for your kindly advice. 

Thanks.

If may please check the attached files below.

Message 1 of 2
(2,692 Views)

I am having this same issue! this is absolutely ridiculous. If I pop over into the Arduino IDE and type digital write(54,HIGH); no problem. Im almost positive that the only way to accomplish this is by closing the digital channels then opening the analogs.

I guess that's what NI means when they lazily say "This example program (this "program") was developed by a National Instruments ("NI") engineer. Although provided by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE"

0 Kudos
Message 2 of 2
(2,336 Views)