Go Down

Topic: arduino micro (Read 321 times) previous topic - next topic

Telescopeman

am trying to use the analog in pins # A1 thru A4 as digital out pins but they would not turn on. With the Uno  and Nano all I have to do is"digitalWrite(15,HIGH) and they turn on. What to do?

PaulRB

#1
Mar 20, 2019, 11:36 pm Last Edit: Mar 20, 2019, 11:38 pm by PaulRB
pinMode(A1, OUTPUT);

The pin number, like 15, which is equivalent to A1 may be different on micro compared to Uno.

Telescopeman

designations are the same but the pins don't turn on.

PaulRB


Telescopeman

I don't understand your response, what should read. I need something specific to the micro which is not explained in the "micro" documentations.

Telescopeman

Is there a problem with using the analog inputs as digital outputs on a Arduino "micro". according to the documentation the pins are supposed to be able to  be used as digital with the digitalWrite command.

neiklot

Post your exact code and I'll try it.

What means are you using to check the pin's high-ness or low-ness?


neiklot

#7
Mar 22, 2019, 06:47 am Last Edit: Mar 22, 2019, 07:00 am by neiklot
Works for me with Ax designation but not with numbers. So A0 works, 14 doesn't




designations are the same
I cba to search the reference to find where it does / not say that, so post a link if you can find it.


PaulRB

I don't understand your response, what should read.
Specifially, this and this.

Telescopeman

Code is 6.3k bytes long. Sending by attachment.

neiklot

Code is 6.3k bytes long. Sending by attachment.
But what are you asking? I tested earlier that you can use a micro's analog pins as digital, you just have to use the Ax naming not the numbers.


Telescopeman

I just now rewrote that part of the constants and retested and it works  as expected. Just sent the program as a donation, hope  someone can use it. thanks for all the help.  Sure wish they had a compiler written in Thai for my nephew.

Go Up