Arduino use Analog pins as Digital pin

preview_player
Показать описание
A description of the analog input pins on an Arduino chip (Atmega8, Atmega168, Atmega328, or Atmega1280).

The Atmega controllers used for the Arduino contain an onboard 6 channel analog-to-digital (A/D) converter. The converter has 10 bit resolution, returning integers from 0 to 1023. While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).

Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO. ::::::::::: SUPPORT CHANNEL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Don't forget to subscribe!
Рекомендации по теме
Комментарии
Автор

YOU saved I was 3 pins short on my project! Thank you

FernandoRodriguez-uofk
Автор

Omg thanks!!now i can have 20 outputs!

Kostanj
Автор

I been searching for this video every where. Thanks a lot, you just saved my day! Kudos :)

SK_Senthil
Автор

void setup(){
pinMode(A0, OUTPUT);
pinMode(A1, INPUT);


digitalWrite(A0, LOW);
}

void loop(){
if(digitalRead(A1)==LOW){
digitalWrite(A0, HIGH);
}

else{
digitalWrite(A0, LOW);
}
}

johofdigitalworldjdw
Автор

thank you !! that was short and to the point

MrBensella
Автор

Thank you
Now I can save my PWM pins ❤

sanjanaattanayake
Автор

void setup(){
pinMode(A0, OUTPUT);

}

void loop(){
pinMode(A0, HIGH);
delay(500);

pinMode(A0, LOW);
delay(500);

}

johofdigitalworldjdw
Автор

Great video....I left a will learn Python for arduino sometime, (I'd rather stay focused w/arduino than raspberry.)

dalek
Автор

The video I searched for... lots of thanks....

fakerio
Автор

Do it with A6 & A7. I will share, subs, and like.

Ammy-bcbh
Автор

What will happen if i apply negative voltage on analoge pin i mean if i changed the polarity of dc voltgae which are given on analog input pin?

muhammadnoumankhan
Автор

this is the one i was looking for. connectimg it to a relay thanks!

addamsapple
Автор

Can I use these pins to connect servo to send data to my servo

sanjeevsharma-fgvz
Автор

i can use an digital pin as a analog pin ?

avengers