{"id":5952,"date":"2021-02-02T12:54:41","date_gmt":"2021-02-02T12:54:41","guid":{"rendered":"http:\/\/bryceautomation.com\/?p=5952"},"modified":"2021-02-02T16:11:38","modified_gmt":"2021-02-02T16:11:38","slug":"arduino-analog-input","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/","title":{"rendered":"Arduino Analog Input"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Introduction to Arduino Analog Input<\/h4>\n\n\n\n<p>In this post, we&#8217;ll walk through the example for the Arduino Analog Input.   You will find this example under File | Examples | Analog.  In this case, I&#8217;ll be using the Arduino UNO for this simulation.  However, the example will work with many of the other processors.<\/p><div id=\"bryce-4218391265\" class=\"bryce-afterfirst bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"7728240895\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n\n<p>Basically, we are using a potentiometer.   Zero to five volts will give us a value of 0 to 1023.  We call this a raw value.  Generally, to convert the raw value into engineering units, we need to <strong>SCALE <\/strong>this value.  Let&#8217;s take a look at the example.  I&#8217;ve developed the snapshots using <a href=\"http:\/\/tinkercad.com\">tinkercad<\/a>, which is a great tool for simulation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"786\" height=\"540\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png\" alt=\"\" class=\"wp-image-5954 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png 786w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-300x206.png 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-768x528.png 768w\" data-sizes=\"(max-width: 786px) 100vw, 786px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 786px; --smush-placeholder-aspect-ratio: 786\/540;\" \/><\/figure>\n\n\n\n<p>Notice that when the potentiometer is counter-clockwise, the wiper will have 5 volts.  It&#8217;s against the +5v terminal.  Likewise, when the potentiometer is completely clockwise, we will have 0v on the wiper.  The wiper is against ground at this point.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Initialize your Variables<\/h4>\n\n\n\n<p>Let&#8217;s look at the first few lines of code in the example.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"540\" height=\"64\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-1.png\" alt=\"\" class=\"wp-image-5955 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-1.png 540w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-1-300x36.png 300w\" data-sizes=\"(max-width: 540px) 100vw, 540px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 540px; --smush-placeholder-aspect-ratio: 540\/64;\" \/><\/figure>\n\n\n\n<p>Obviously, all we do here is initialize the variables.   The sensorPin is A0.  This is what our potentiometer connects to.  The ledPin is 13.  This is the built in LED for the Arduino UNO.  Finally, we need to initialize the sensorValue to hold the data from A0.   We initialize this value to 0.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Setup Function for Arduino Analog Input<\/h4>\n\n\n\n<p>All we need to do in setup is to set the ledPin to output mode.  Remember, our ledPin is 13 in this case.  This is the LED that is built into the UNO.  We do not need to connect an external LED to see this work.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"270\" height=\"77\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-2.png\" alt=\"\" class=\"wp-image-5956 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 270px; --smush-placeholder-aspect-ratio: 270\/77;\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Loop Function for Arduino Analog Input<\/h4>\n\n\n\n<p>Under the void loop() function,  we read the value from the sensorPin, which is A0.  Remember this is the pin that our potentiometer connects to.  In the next line, we have a digitalWrite.  The purpose of the digitalWrite is to turn on the LED.  Notice it sets our ledPin to a HIGH state (which is ON).<\/p>\n\n\n\n<p>In the next line, we delay for a certain amount of time.  Recall the sensorValue ranges from 0 to 1023.  For this reason, when the potentiometer is completely counter-clockwise, we will delay for a little bit more than a second (1023 milliseconds).  At this time, we shut off the LED with another digitalWrite.<\/p>\n\n\n\n<p>Lastly, have a delay function for the same amount of time.  The process repeats infinitely.  <\/p>\n\n\n\n<p>By turning the pot half way, our delay is a little over half a second, so the light blinks twice as fast.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"421\" height=\"212\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-3.png\" alt=\"\" class=\"wp-image-5957 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-3.png 421w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-3-300x151.png 300w\" data-sizes=\"(max-width: 421px) 100vw, 421px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 421px; --smush-placeholder-aspect-ratio: 421\/212;\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Scale the Data using the MAP Function<\/h4>\n\n\n\n<p>First, we&#8217;ll initialize another variable in the head of our code.  This variable is called percentValue.  Obviously, we&#8217;ll initialize this to 0.   Our goal for this variable is to have it hold a percentage for the pot, which is 0 to 100.  Fully clockwise is 0.  Likewise, fully counter-clockwise will be 100%.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"590\" height=\"92\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-4.png\" alt=\"\" class=\"wp-image-5959 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-4.png 590w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-4-300x47.png 300w\" data-sizes=\"(max-width: 590px) 100vw, 590px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 590px; --smush-placeholder-aspect-ratio: 590\/92;\" \/><\/figure>\n\n\n\n<p>Likewise, under void setup(), I&#8217;ll start the serial monitor.  This will allow us to print the value over serial to verify our map function is working.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"426\" height=\"111\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-5.png\" alt=\"\" class=\"wp-image-5960 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-5.png 426w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-5-300x78.png 300w\" data-sizes=\"(max-width: 426px) 100vw, 426px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 426px; --smush-placeholder-aspect-ratio: 426\/111;\" \/><\/figure>\n\n\n\n<p>Next, in the void loop(), we scale the value using the map function.  We&#8217;ll then print the value to the serial monitor.  sensorValue is the variable we want to scale.  As you can see, our raw value is 0 to 1023, and the scaled value is 0 to 100.  Use the example shown below as a guide.  Be sure to separate each parameter by the comma.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"520\" height=\"49\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-6.png\" alt=\"\" class=\"wp-image-5962 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-6.png 520w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-6-300x28.png 300w\" data-sizes=\"(max-width: 520px) 100vw, 520px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 520px; --smush-placeholder-aspect-ratio: 520\/49;\" \/><\/figure>\n\n\n\n<p>Lastly, print the value to the serial monitor.  When we run the project, you can see our percentValue variable is showing 100% when the potentiometer is fully counter-clockwise.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"221\" height=\"185\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image-7.png\" alt=\"\" class=\"wp-image-5975 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 221px; --smush-placeholder-aspect-ratio: 221\/185;\" \/><\/figure>\n\n\n\n<p>For other examples for beginners, visit the <a href=\"https:\/\/bryceautomation.com\/index.php\/category\/beginner\/\">beginner&#8217;s category page!<\/a><\/p>\n\n\n\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-3373841223\" class=\"bryce-after-content bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"4667596182\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Introduction to Arduino Analog Input In this post, we&#8217;ll walk through the example for the Arduino Analog Input. You will find this example under File | Examples | Analog. In this case, I&#8217;ll be using the Arduino UNO for this simulation. However, the example will work with many of the other processors. Basically, we are <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":5954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8],"tags":[307,61],"class_list":{"0":"post-5952","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-arduino-other-microprocessors","8":"category-beginner","9":"tag-analog-inputs","10":"tag-arduino","11":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino Analog Input and Scaling - Bryce Automation<\/title>\n<meta name=\"description\" content=\"In this post, we&#039;ll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Analog Input and Scaling - Bryce Automation\" \/>\n<meta property=\"og:description\" content=\"In this post, we&#039;ll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/\" \/>\n<meta property=\"og:site_name\" content=\"Bryce Automation\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ricky.bryce.7\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-02T12:54:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-02T16:11:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"786\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ricky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"Arduino Analog Input\",\"datePublished\":\"2021-02-02T12:54:41+00:00\",\"dateModified\":\"2021-02-02T16:11:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/\"},\"wordCount\":609,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"keywords\":[\"analog inputs\",\"Arduino\"],\"articleSection\":[\"Arduino and other microprocessors\",\"Beginner\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/\",\"name\":\"Arduino Analog Input and Scaling - Bryce Automation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"datePublished\":\"2021-02-02T12:54:41+00:00\",\"dateModified\":\"2021-02-02T16:11:38+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"In this post, we'll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"width\":786,\"height\":540,\"caption\":\"Arduino Analog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2021\\\/02\\\/02\\\/arduino-analog-input\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Analog Input\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/\",\"name\":\"Bryce Automation\",\"description\":\"Automating Home and Industry...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bryceautomation.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\",\"name\":\"Ricky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"caption\":\"Ricky\"},\"sameAs\":[\"http:\\\/\\\/bryceautomation.com\",\"https:\\\/\\\/www.facebook.com\\\/ricky.bryce.7\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ricky-bryce-4367a416\\\/\"],\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/author\\\/ricky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Analog Input and Scaling - Bryce Automation","description":"In this post, we'll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Analog Input and Scaling - Bryce Automation","og_description":"In this post, we'll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.","og_url":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2021-02-02T12:54:41+00:00","article_modified_time":"2021-02-02T16:11:38+00:00","og_image":[{"width":786,"height":540,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png","type":"image\/png"}],"author":"Ricky","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"Arduino Analog Input","datePublished":"2021-02-02T12:54:41+00:00","dateModified":"2021-02-02T16:11:38+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/"},"wordCount":609,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png","keywords":["analog inputs","Arduino"],"articleSection":["Arduino and other microprocessors","Beginner"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/","url":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/","name":"Arduino Analog Input and Scaling - Bryce Automation","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png","datePublished":"2021-02-02T12:54:41+00:00","dateModified":"2021-02-02T16:11:38+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"In this post, we'll discuss the Arduino Analog Inputs, and how to scale the raw data into engineering units using the MAP function.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2021\/02\/image.png","width":786,"height":540,"caption":"Arduino Analog"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2021\/02\/02\/arduino-analog-input\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"Arduino Analog Input"}]},{"@type":"WebSite","@id":"https:\/\/bryceautomation.com\/#website","url":"https:\/\/bryceautomation.com\/","name":"Bryce Automation","description":"Automating Home and Industry...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bryceautomation.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7","name":"Ricky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","url":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","caption":"Ricky"},"sameAs":["http:\/\/bryceautomation.com","https:\/\/www.facebook.com\/ricky.bryce.7","https:\/\/www.linkedin.com\/in\/ricky-bryce-4367a416\/"],"url":"https:\/\/bryceautomation.com\/index.php\/author\/ricky\/"}]}},"_links":{"self":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/5952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/comments?post=5952"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/5952\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/5954"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=5952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=5952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=5952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}