• 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
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

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Difference Between Arduino Uno and Arduino Mega

    What is the Difference Between Arduino Uno and Arduino Mega? Do We Need Arduino Mega Despite Having Arduino UNO?

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • How to Increase the Number of Digital Pins in Arduino (Port Extender)

    13+6 Pins Often a Limitation of Arduino in Projects Where We Need Many Pins. Here is How to Increase the Number of Digital Pins in Arduino.

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

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
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