{"id":42267,"date":"2017-08-31T12:10:03","date_gmt":"2017-08-31T12:10:03","guid":{"rendered":"http:\/\/randomnerdtutorials.com\/?p=42267"},"modified":"2019-08-24T14:33:54","modified_gmt":"2019-08-24T14:33:54","slug":"arduino-eeprom-explained-remember-last-led-state","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/arduino-eeprom-explained-remember-last-led-state\/","title":{"rendered":"Arduino EEPROM Explained &#8211; Remember Last LED State"},"content":{"rendered":"\n<p>This tutorial explains what is the Arduino EEPROM and what it is useful for. We\u2019re also going to show you how to write and read from the EEPROM and build a project example to put the concepts learned into practice.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"700\" height=\"463\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM.png?resize=700%2C463&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-42277\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM.png?w=700&amp;quality=100&amp;strip=all&amp;ssl=1 700w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM.png?resize=300%2C198&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p>We have a similar tutorial for the ESP32: <a href=\"https:\/\/randomnerdtutorials.com\/esp32-flash-memory\/\"><strong>ESP32 Flash Memory \u2013 Store Permanent Data (Write and Read)<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>When you define and use a variable, the &nbsp;generated data&nbsp;within a sketch only lasts as long as the Arduino is on. If you reset or power off the Arduino, the data stored disappears.<\/p>\n\n\n\n<p>If you want to keep the data stored for future use you need to use the Arduino EEPROM. This stores the variable\u2019s data even when the Arduino resets or the power is turned off.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is EEPROM?<\/h2>\n\n\n\n<p>The microcontroller on the Arduino board (ATMEGA328 in case of Arduino UNO, shown in figure below) has EEPROM (Electrically Erasable Programmable Read-Only Memory). This is a small space that can store byte variables.<\/p>\n\n\n\n<p>The variables stored in the EEPROM kept there, event when you reset or power off the Arduino. Simply, the EEPROM is permanent storage similar to a hard drive in computers.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"289\" height=\"134\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/atmega328.jpg?resize=289%2C134&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-42276\"\/><\/figure><\/div>\n\n\n\n<p>The EEPROM can be read, erased and re-written electronically. In Arduino, you can read and write from the EEPROM easily using the <span class=\"rnthl rntliteral\">EEPROM<\/span> library.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How many bytes can you store?<\/h3>\n\n\n\n<p>Each EEPROM position can save one byte, which means you can only store 8-bit numbers, which includes integer values between 0 and 255.<\/p>\n\n\n\n<p>The bytes you can store on EEPROM dependson the microcontrollers on the Arduino boards. Take a look at the table below:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Microcontroller<\/strong><\/td><td><strong>EEPROM<\/strong><\/td><\/tr><tr><td>ATmega328 (Arduino Uno, Nano, Mini)<\/td><td>1024 bytes<\/td><\/tr><tr><td>ATmega168 (Arduino Nano)<\/td><td>512 bytes<\/td><\/tr><tr><td>ATmega2560 (Arduino Mega)<\/td><td>4096 bytes<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>However, if you need to store more data you can get an external EEPROM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The EEPROM finite life<\/h2>\n\n\n\n<p>The EEPROM has a finite life. In Arduino, the EEPROM is specified to handle 100 000 write\/erase cycles for each position. However, reads are unlimited. This means you can read from the EEPROM as many times as you want without compromising its life expectancy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Applications in Arduino projects &#8211; Remember last state<\/h2>\n\n\n\n<p>The EEPROM is useful in Arduino projects that need to keep data even when the Arduino resets or when power is removed.<\/p>\n\n\n\n<p>It is specially useful to remember the last state of a variable or to remember how many times an appliance was activated.<\/p>\n\n\n\n<p>For example, imagine the following scenario:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You\u2019re controlling a lamp with your Arduino and the\u00a0lamp is on;<\/li><li>The Arduino suddenly loses power;<\/li><li>When the power backs on, the lamp stays off &#8211; it doesn\u2019t keep its last change.<\/li><\/ul>\n\n\n\n<p>You don\u2019t want this to happen. You want the Arduino to remember what was happening before losing power and return to the last state.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1200\" height=\"273\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-without-eeprom.png?resize=1200%2C273&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-42287\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-without-eeprom.png?w=1201&amp;quality=100&amp;strip=all&amp;ssl=1 1201w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-without-eeprom.png?resize=300%2C68&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-without-eeprom.png?resize=768%2C175&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-without-eeprom.png?resize=1024%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n\n<p>To solve this problem, you can save the lamp\u2019s state in the EEPROM and add a condition to your sketch to initially check whether the state of the lamp corresponds to the state previously saved in the EEPROM.<\/p>\n\n\n\n<p>We\u2019ll exemplify this with an example later in this post in the Example: <strong>Arduino EEPROM remember stored LED state<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Read and Write<\/h2>\n\n\n\n<p>You can easily read and write into the EEPROM using the <span class=\"rnthl rntliteral\">EEPROM<\/span> library.<\/p>\n\n\n\n<p>To include the EEPROM library:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include &lt;EEPROM.h><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Write<\/h3>\n\n\n\n<p>To write data into the EEPROM, you use the <span class=\"rnthl rntliteral\">EEPROM.write()<\/span> function that takes in two arguments. The first one is the EEPROM location or address where you want to save the data, and the second is the value we want to save:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.write(address, value);<\/code><\/pre>\n\n\n\n<p>For example, to write 9 on address 0, you\u2019ll have:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.write(0, 9);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Read<\/h3>\n\n\n\n<p>To read a byte from the EEPROM, you use the <span class=\"rnthl rntliteral\">EEPROM.read()<\/span> function. This function takes the address of the byte has an argument.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.read(address);<\/code><\/pre>\n\n\n\n<p>For example, to read the byte stored previously in address 0.:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.read(0);<\/code><\/pre>\n\n\n\n<p>This would return <strong>9<\/strong>, which is the value stored in that location.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update a value<\/h3>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">EEPROM.update()<\/span> function is particularly useful. It only writes on the EEPROM if the value written is different from the one already saved.<\/p>\n\n\n\n<p>As the EEPROM has limited life expectancy due to limited write\/erase cycles, using the <span class=\"rnthl rntliteral\">EEPROM.update()<\/span> function instead of the <span class=\"rnthl rntliteral\">EEPROM.write()<\/span> saves cycles.<\/p>\n\n\n\n<p>You use the <span class=\"rnthl rntliteral\">EEPROM.update()<\/span> function as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.update(address, value);<\/code><\/pre>\n\n\n\n<p>At the moment, we have 9 stored in the address 0. So, if we call:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.update(0, 9);<\/code><\/pre>\n\n\n\n<p>It won\u2019t write on the EEPROM again, as the value currently saved is the same we want to write.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Arduino EEPROM remember stored LED state<\/h2>\n\n\n\n<p>In this example, we\u2019re going to show you how to make the Arduino remember the stored LED state, even when we reset the Arduino or the power goes off.<\/p>\n\n\n\n<p>The following figure shows what we&#8217;re going to exemplify:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1194\" height=\"374\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?resize=1194%2C374&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-42286\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?w=1194&amp;quality=100&amp;strip=all&amp;ssl=1 1194w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?resize=300%2C94&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?resize=768%2C241&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?resize=1024%2C321&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/led-state-eeprom.png?resize=1190%2C374&amp;quality=100&amp;strip=all&amp;ssl=1 1190w\" sizes=\"(max-width: 1194px) 100vw, 1194px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parts required<\/h3>\n\n\n\n<p>Here\u2019s the parts required for this project (click the links below to find the best price at&nbsp;<a href=\"https:\/\/makeradvisor.com\/tools\/\" target=\"_blank\" rel=\"noreferrer noopener\">Maker Advisor<\/a>):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/makeradvisor.com\/tools\/compatible-arduino-uno-r3-board\/\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino UNO<\/a>&nbsp;\u2013 read&nbsp;<a href=\"https:\/\/makeradvisor.com\/best-arduino-starter-kits\/\" target=\"_blank\" rel=\"noreferrer noopener\">Best Arduino Starter Kits<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/3mm-5mm-leds-kit-storage-box\/\" target=\"_blank\" rel=\"noreferrer noopener\">1x LED&nbsp;<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/resistors-kits\/\" target=\"_blank\" rel=\"noreferrer noopener\">1x 220\u03a9 resistor&nbsp;<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/pushbuttons-kit\/\" target=\"_blank\" rel=\"noreferrer noopener\">1x Pushbutton&nbsp;<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/resistors-kits\/\" target=\"_blank\" rel=\"noreferrer noopener\">1x 1k\u03a9 resistor&nbsp;<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\" target=\"_blank\" rel=\"noreferrer noopener\">1x Breadboard&nbsp;<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/jumper-wires-kit-120-pieces\/\" target=\"_blank\" rel=\"noreferrer noopener\">Jumper wires&nbsp;<\/a><\/li><\/ul>\n\n\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Schematics<\/h3>\n\n\n\n<p>Here\u2019s the circuit schematics for this project. This is just a pushbutton that will turn an LED on and off.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"838\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM_debounce_schematics_bb.png?resize=700%2C838&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-42273\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM_debounce_schematics_bb.png?w=700&amp;quality=100&amp;strip=all&amp;ssl=1 700w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM_debounce_schematics_bb.png?resize=251%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 251w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Code<\/h3>\n\n\n\n<p>Copy the following code to the Arduino IDE and upload it to your Arduino board. Make sure you have the right board and COM port selected.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n * Rui Santos \n * Complete Project Details http:\/\/randomnerdtutorials.com\n *\/\n\n#include &lt;EEPROM.h&gt;\n\nconst int buttonPin = 8;    \/\/ pushbutton pin\nconst int ledPin = 4;       \/\/ LED pin\n\nint ledState;                \/\/ variable to hold the led state\nint buttonState;             \/\/ the current reading from the input pin\nint lastButtonState = LOW;   \/\/ the previous reading from the input pin\n\n\n\/\/ the following variables are long's because the time, measured in miliseconds,\n\/\/ will quickly become a bigger number than can be stored in an int.\nlong lastDebounceTime = 0;  \/\/ the last time the output pin was toggled\nlong debounceDelay = 50;    \/\/ the debounce time; increase if the output flickers\n\nvoid setup() {\n  \/\/ set input and output\n  pinMode(buttonPin, INPUT);\n  pinMode(ledPin, OUTPUT);\n\n  \/\/ set initial LED state\n  digitalWrite(ledPin, ledState);\n\n  \/\/ initialize serial monitor\n  Serial.begin (9600);\n\n  \/\/check stored LED state on EEPROM using function defined at the end of the code\n  checkLedState(); \n}\n\nvoid loop() {\n  \/\/ read the state of the switch into a local variable\n  int reading = digitalRead(buttonPin);\n\n  if(reading != lastButtonState) {\n    \/\/ reset the debouncing timer\n    lastDebounceTime = millis();\n  }\n\n  if((millis() - lastDebounceTime) &gt; debounceDelay) {\n    \/\/ whatever the reading is at, it's been there for longer\n    \/\/ than the debounce delay, so take it as the actual current state:\n\n    \/\/ if the button state has changed:\n    if(reading != buttonState) {\n      buttonState = reading;\n\n      \/\/ only toggle the LED if the new button state is HIGH\n      if(buttonState == HIGH) {\n        ledState = !ledState;\n      }\n    }\n  }\n\n  \/\/ set the LED state\n  digitalWrite(ledPin, ledState);\n  \/\/ save the current LED state in the EEPROM\n  EEPROM.update(0, ledState);\n  \/\/ save the reading.  Next time through the loop,\n  \/\/ it'll be the lastButtonState\n  lastButtonState = reading;\n}\n\n\/\/ Prints and upates the LED state\n\/\/ when the Arduino board restarts or powers up\nvoid checkLedState() {\n   Serial.println(&quot;LED status after restart: &quot;);\n   ledState = EEPROM.read(0);\n   if(ledState == 1) {\n    Serial.println (&quot;ON&quot;);\n    digitalWrite(ledPin, HIGH);\n   } \n   if(ledState == 0) {\n    Serial.println (&quot;OFF&quot;);\n    digitalWrite(ledPin, LOW);\n   }\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/Arduino_EEPROM.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>This is a debounce code that changes the LED state every time you press the pushbutton. But there&#8217;s something special about this code &#8211; it remembers the saved LED state, even after resetting or powering of the Arduino.<\/p>\n\n\n\n<p>Basically, we save the current LED state in the <span class=\"rnthl rntliteral\">ledState<\/span> variable and save it to the EEPROM with the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>EEPROM.update(0,ledState);<\/code><\/pre>\n\n\n\n<p>At the beginning of the code on the <span class=\"rnthl rntliteral\">setup()<\/span>, we check the <span class=\"rnthl rntliteral\">ledState<\/span> saved on EEPROM and set the led on or off accordingly to that state when we restart the program. We do that with a function we&#8217;ve created at the end of the code, <span class=\"rnthl rntliteral\">checkLedState()<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>void checkLedState() {\n    Serial.println(\"LED status after restart: \");\n    ledState = EEPROM.read(0);\n     if (ledState == 1) {\n       Serial.println (\"ON\");\n       digitalWrite(ledPin, HIGH);\n     } \n     if (ledState == 0) {\n       Serial.println (\"OFF\");\n       digitalWrite(ledPin, LOW);\n     }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>For a demonstration of this example, watch the video below.<\/p>\n\n\n<p style=\"text-align:center\"><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/6CmL2Dl02Q8?rel=0\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up<\/h2>\n\n\n\n<p>In this post you&#8217;ve learned about the Arduino EEPROM and what it is useful for. You&#8217;ve created an Arduino sketch that remembers the last LED state even after resetting the Arduino.<\/p>\n\n\n\n<p>This is just a simple example for you to understand how the use of EEPROM. The idea is that you apply the concepts learned in this tutorial to your own projects.<\/p>\n\n\n\n<p>If you like Arduino, we recommend taking a look at our Arduino resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"https:\/\/randomnerdtutorials.com\/arduino-step-by-step-projects\/\" target=\"_blank\"><strong>Arduino Step-by-step projects &#8211; Build 25 projects<\/strong><\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/projects-arduino\/\"><strong>Free Arduino Tutorials<\/strong><\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-mini-course\/\"><strong>Free Arduino Mini Course<\/strong><\/a><\/li><\/ul>\n\n\n\n<p>We hope you&#8217;ve found this article useful.<\/p>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains what is the Arduino EEPROM and what it is useful for. We\u2019re also going to show you how to write and read from the EEPROM and build &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Arduino EEPROM Explained &#8211; Remember Last LED State\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/arduino-eeprom-explained-remember-last-led-state\/#more-42267\" aria-label=\"Read more about Arduino EEPROM Explained &#8211; Remember Last LED State\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":42277,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[303,267,2,230,269,264,7,10],"tags":[],"class_list":["post-42267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-arduino","category-arduino-project","category-arduino","category-guide","category-guide-project","category-project","category-a-theory-and-blog","category-a-tutorials"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/EEPROM.png?fit=700%2C463&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/42267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=42267"}],"version-history":[{"count":0,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/42267\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/42277"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=42267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=42267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=42267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}