• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Difference Between Analog and Digital Pins in Arduino UNO

By Abhishek Ghosh May 10, 2018 8:06 am Updated on May 10, 2018

Difference Between Analog and Digital Pins in Arduino UNO

Advertisement

You definitely noticed that, for the same sensor, in some project we use Analog pin, but in some other project we use Digital pin. The analog pins on the Arduino can be used as digital outputs. There is another word or phrase – PWM. Pulse Width Modulation (PWM) is a method for getting analog results by digital means, like fading LED. Let us Discuss the Difference Between Analog and Digital Pins in Arduino UNO. You will get documentation of Arduino pin outs on official site :

Vim
1
2
3
https://www.arduino.cc/en/Tutorial/DigitalPins
https://www.arduino.cc/en/Tutorial/AnalogInputPins
https://www.arduino.cc/en/Tutorial/PWM

 

Difference Between Analog and Digital Pins in Arduino UNO

 

digitalRead() works on all pins on Arduino UNO. digitalRead() will simply round the analog value received and present it to you. digitalWrite() has allowed parameter 0 or 1. analogRead() works only with analog pins. It can accept any value between 0 and 1023. The analog pins let you read/write analog values – basically, instead of giving out a voltage of 0 or 5 (that is for digital pins), analog pins can give a range of voltages between 0 and 5, we can measure that output with a multimeter. Analog pins actually send pulses of 0V and 5V signals to get an output that feels analog (that is PWM). PWM is like pseudo-analog signal.

So when we need 0 or 1 as response, using digitalRead() is practical. Whereas, to read sensor values, analogRead() is practical. analogWrite() works on all analog pins and all digital PWM pins. You can supply it any value between 0 and 255. Taking pin A1 as example, if analogRead(A1) is greater than or equal to 512, then digitalRead(A1) will be 1, otherwise it will be 0. digitalWrite(A0,0) is the same as analogWrite(A0,0), and digitalWrite(A0,1) is the same as analogWrite(A0,255). So, digitalRead() will return HIGH or LOW. analogRead() will returns any number from 0-1023.

Advertisement

---

Difference Between Analog and Digital Pins in Arduino UNO

Analogue reads are usually very slow, but fairly precise. Pin A0-A5 are labelled Analog IN. This is primarily because these pins are used as input pins. They take inputs in the form of Analog signals, and return values between 0 and 1023. Arduino UNO has a 10 bit Analog to Digital converter to do that job.

An Analog to Digital converter works roughly in three stages – sampling, quantization and digitization. Arduino operates on a 0–5 volts range, it is 5/1023=0.00488volts or 4.88mV. In this way, a 4.88 mV input is 1, a 9.77 mV input is 2 and at end 5 V input is 1023. Below 4.88 mV is 0. Above 5 V can be risky for the board.

Tagged With https://thecustomizewindows com/2018/05/difference-between-analog-and-digital-pins-in-arduino-uno/ , arduino analog vs digital pins , arduino analog pins , arduino uno analog pins , arduino analog vs digital , arduino digital vs analog pins , digital vs analog pins arduino , analog pin , analog and digital pins difference in arduino , analog pins arduino

This Article Has Been Shared 542 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Difference Between Analog and Digital Pins in Arduino UNO

  • DIY Basic Stand For TM1637 7 Segment LED Display Module

    Is Not It Risky To Use LED Display Unprotected? Here Is How To Build DIY Basic Stand For TM1637 7 Segment LED Display Module With Cardboard.

  • ATtiny Arduino Boards For Cost Saving Projects

    Ready to Use Cheap ATtiny Arduino Boards Available. Here is What to Know About ATtiny Arduino Boards For Cost Saving Projects Before Buying.

  • List of Electronics Prototyping & Project Materials

    Our Illustrated List of Electronics Prototyping & Project Materials is a Helpful Guide to Those Who Lacks Conventional Course on Electronics.

  • How To Play MP3 On Arduino With No Shield, No SD Card

    Here is How to Play MP3 On Arduino With No Shield, No SD Card at Lower Bit Rate for Few Seconds. It is Suggested to Try for Learning Basic.

  • 1602A LCD Display Arduino Connection (Blue Light White Text 16×2)

    Here is Detailed Steps on How to For 1602A LCD Display Arduino Connection. We Provided Guide on Soldering of Blue Light White Text Displays.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Difference Between Analog and Digital Pins in Arduino UNO," in The Customize Windows, May 10, 2018, February 1, 2023, https://thecustomizewindows.com/2018/05/difference-between-analog-and-digital-pins-in-arduino-uno/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT