0% found this document useful (0 votes)
6 views3 pages

001 Arduino-For-Beginners-Pins-Recap

The document provides an overview of the pin configuration on the Arduino Uno, highlighting 14 digital pins and 6 analog pins. Digital pins can be set as INPUT or OUTPUT, allowing for reading and writing binary values, while analog pins are used to read voltage variations and do not require mode setup. Additionally, analog pins can function as standard digital pins, but PWM functionality is not available on them.

Uploaded by

christopher john
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

001 Arduino-For-Beginners-Pins-Recap

The document provides an overview of the pin configuration on the Arduino Uno, highlighting 14 digital pins and 6 analog pins. Digital pins can be set as INPUT or OUTPUT, allowing for reading and writing binary values, while analog pins are used to read voltage variations and do not require mode setup. Additionally, analog pins can function as standard digital pins, but PWM functionality is not available on them.

Uploaded by

christopher john
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Arduino Pins - Recap

(​Arduino For Beginners​ Course)

On Arduino Uno, you get:


- 14 digital pins (orange)
- 6 analog pins (green)

Digital Pins

Digital pins are used to read/write digital values (which are binary values: HIGH/LOW or 1/0).

For any given digital pin on the Arduino, you can decide to set it as INPUT or OUTPUT, with the
pinMode(pin_number, mode)​ function.
Then:
- For INPUT pins, you can read the state of the pin with ​digitalRead(pin_number)
- For OUTPUT pins, you can write the state of the pin with ​digitalWrite(pin_number)

Note:
- For some of the digital pins (with a “~” symbol next to the number on the board), you can
use a PWM with the function ​analogWrite(pin_number, value between 0..255).​

Analog Pins

Analog pins are used to read analog values (variation of the voltage between 0 and 5V).

You don’t need to set up the mode for an analog input pin, it’s already set as INPUT.
Then:
- To read an analog value, you can use analogRead(pin_number), which will convert the
analog signal into a digital value between 0 and 1023, that you can use in your code.

Or:
- You can use any analog pin as a standard digital pin. Very handy when you’ve already
used all digital pins. To do that, don’t forget to set the mode for the pin with
pinMode(pin_number, mode)​. Note that you can’t use the PWM functionality on analog
pins.

You might also like