{"id":17962,"date":"2022-08-08T16:12:14","date_gmt":"2022-08-08T09:12:14","guid":{"rendered":"https:\/\/www.makeriot2020.com\/?p=17962"},"modified":"2022-08-08T16:12:20","modified_gmt":"2022-08-08T09:12:20","slug":"using-a-rotary-encoder","status":"publish","type":"post","link":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/","title":{"rendered":"Using a Rotary Encoder"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( <a href=\"http:\/\/makeriot2020.com\/index.php\/2022\/07\/27\/atmega-328p-based-pwm-controller-card\/\" target=\"_blank\" rel=\"noopener\">Atmega 328P Base PWM Controller Card<\/a>). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one possible way to implement a rotary encoder onto that particular device. (It can also be adapted for other devices, of course)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Arduino Style Code for using a rotary encoder<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Constants and Variables\nconst int encFWD = 8;\nconst int encREV = 7;\nint aState;\nint aLastState;\nint encDir;\nint encTurned = LOW;\nint encLastState;\nint encValue = 0;\nint lastEncValue;\nconst int encInc = 10;\n\nunsigned long lastEncDebounce = 0;\nunsigned encDebounceDelay = 50;\nconst int encBtn = 9;\nint encButtonState;\nint lastEncBtnState = LOW;\nint EncBtnValue = LOW;\nint encBtnState;\n\nvoid setup() {\n  \/\/Rotary Encoder\n  pinMode(encFWD,INPUT_PULLUP);\n  pinMode(encREV,INPUT_PULLUP);\n  pinMode(encBtn,INPUT_PULLUP);\n  \/\/ Init the pins in UNPUT Pullup Mode\n  encTurned = LOW; \/\/ Flag for encoder\n\n  encLastState = digitalRead(encFWD);\n  \/\/Serial\n  Serial.begin(115200);\n  \/\/Status LED on D13\n  pinMode(13,OUTPUT);\n  digitalWrite(13,LOW);\n}\n\nvoid loop() {\n  lastEncValue = encValue;\n \/\/Handle the Encoder Push Button\n encBtnState = digitalRead(encBtn);\n if (encBtnState != lastEncBtnState) {\n    lastEncDebounce = millis();\n }\n if ((millis() - lastEncDebounce) > encDebounceDelay) {\n    if (encBtnState != encButtonState) {\n        encButtonState = encBtnState;\n        if (lastEncBtnState == LOW) {\n          EncBtnValue = !EncBtnValue; \/\/ Toggle the button Value\n        }\n    }\n }\n lastEncBtnState = encBtnState;\n \/\/ Handle the Rotary Encoder Dial\n aState = digitalRead(encFWD);\n if (aState != aLastState) {\n    if (digitalRead(encREV) != aState) {\n       if (encTurned == LOW) {\n          encLastState = encTurned;\n          encTurned = HIGH; \/\/ Set Flag\n\/\/ Setting this flag will get rid of double value entries caused by contact\n\/\/ bounce inside the encoder. I found it easier to implement this way\n\/\/ as opposed to using software debouncing as with the button\n\n       } else {\n          encTurned = LOW; \/\/ Set Flag low\n\/\/ This will ensure that the value is increased only once per \"click\"\n       }\n       if ((encValue &lt; 300) &amp;&amp; (encDir == 0)){\n          if ((encLastState == LOW) &amp;&amp; (encTurned == HIGH)){\n            encValue = encValue + encInc;\n            encDir = 1;\n          }\n       }\n      \n    } else {\n      if (encTurned == LOW) {\n        encLastState = encTurned;\n        encTurned = HIGH;  \n      } else {\n        encTurned = LOW;\n      }\n      if ((encValue > 0) &amp;&amp; (encDir == 0)){\n          if ((encLastState == LOW) &amp;&amp; (encTurned == HIGH)){\n            encValue = encValue - encInc;\n            encDir = 2;\n          }\n      }\n    }\n    encLastState = encTurned;\n}\naLastState = aState;\nencDir = 0;\n\/\/ Print Some Status\nif (encValue != lastEncValue) {\n  Serial.print(\"Encoder Value Changed from \");\n  Serial.print(lastEncValue);\n  Serial.print(\" to \");\n  Serial.println(encValue);\n}\ndigitalWrite(13,EncBtnValue);\n\n\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I hope that this will be useful to somebody. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one &hellip; <a href=\"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using a Rotary Encoder&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":17859,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,42,81],"class_list":["post-17962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-arduino","tag-esp32","tag-esp8266"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"makeriot2020\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Maker and IOT Ideas - Infinite possibilities, waiting to be explored\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Using a Rotary Encoder - Maker and IOT Ideas\" \/>\n\t\t<meta property=\"og:description\" content=\"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"165\" \/>\n\t\t<meta property=\"og:image:height\" content=\"93\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-08-08T09:12:14+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-08-08T09:12:20+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using a Rotary Encoder - Maker and IOT Ideas\" \/>\n\t\t<meta name=\"twitter:description\" content=\"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#blogposting\",\"name\":\"Using a Rotary Encoder - Maker and IOT Ideas\",\"headline\":\"Using a Rotary Encoder\",\"author\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/pwmcontroller-scaled.jpg\",\"width\":1920,\"height\":2560},\"datePublished\":\"2022-08-08T16:12:14+07:00\",\"dateModified\":\"2022-08-08T16:12:20+07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#webpage\"},\"articleSection\":\"Uncategorized, Arduino, ESP32, ESP8266\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.makeriot2020.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"position\":2,\"name\":\"Uncategorized\",\"item\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/uncategorized\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#listItem\",\"name\":\"Using a Rotary Encoder\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#listItem\",\"position\":3,\"name\":\"Using a Rotary Encoder\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\",\"name\":\"Maker and IOT Ideas\",\"description\":\"Infinite possibilities, waiting to be explored\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/LogoSmall.jpg\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#organizationLogo\",\"width\":165,\"height\":93},\"image\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/\",\"name\":\"makeriot2020\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#authorImage\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/5c0\\\/5c020e1b07a03d905edecd8711801fe8x96.jpg\",\"width\":96,\"height\":96,\"caption\":\"makeriot2020\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#webpage\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/\",\"name\":\"Using a Rotary Encoder - Maker and IOT Ideas\",\"description\":\"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/pwmcontroller-scaled.jpg\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#mainImage\",\"width\":1920,\"height\":2560},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/index.php\\\/2022\\\/08\\\/08\\\/using-a-rotary-encoder\\\/#mainImage\"},\"datePublished\":\"2022-08-08T16:12:14+07:00\",\"dateModified\":\"2022-08-08T16:12:20+07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#website\",\"url\":\"https:\\\/\\\/www.makeriot2020.com\\\/\",\"name\":\"Maker and IOT Ideas\",\"description\":\"Infinite possibilities, waiting to be explored\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.makeriot2020.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using a Rotary Encoder - Maker and IOT Ideas","description":"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one","canonical_url":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#blogposting","name":"Using a Rotary Encoder - Maker and IOT Ideas","headline":"Using a Rotary Encoder","author":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.makeriot2020.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/07\/pwmcontroller-scaled.jpg","width":1920,"height":2560},"datePublished":"2022-08-08T16:12:14+07:00","dateModified":"2022-08-08T16:12:20+07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#webpage"},"isPartOf":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#webpage"},"articleSection":"Uncategorized, Arduino, ESP32, ESP8266"},{"@type":"BreadcrumbList","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com#listItem","position":1,"name":"Home","item":"https:\/\/www.makeriot2020.com","nextItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/#listItem","name":"Uncategorized"}},{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/#listItem","position":2,"name":"Uncategorized","item":"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#listItem","name":"Using a Rotary Encoder"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#listItem","position":3,"name":"Using a Rotary Encoder","previousItem":{"@type":"ListItem","@id":"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/#listItem","name":"Uncategorized"}}]},{"@type":"Organization","@id":"https:\/\/www.makeriot2020.com\/#organization","name":"Maker and IOT Ideas","description":"Infinite possibilities, waiting to be explored","url":"https:\/\/www.makeriot2020.com\/","logo":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#organizationLogo","width":165,"height":93},"image":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author","url":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/","name":"makeriot2020","image":{"@type":"ImageObject","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#authorImage","url":"https:\/\/www.makeriot2020.com\/wp-content\/wphb-cache\/gravatar\/5c0\/5c020e1b07a03d905edecd8711801fe8x96.jpg","width":96,"height":96,"caption":"makeriot2020"}},{"@type":"WebPage","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#webpage","url":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/","name":"Using a Rotary Encoder - Maker and IOT Ideas","description":"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.makeriot2020.com\/#website"},"breadcrumb":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#breadcrumblist"},"author":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/07\/pwmcontroller-scaled.jpg","@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#mainImage","width":1920,"height":2560},"primaryImageOfPage":{"@id":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/#mainImage"},"datePublished":"2022-08-08T16:12:14+07:00","dateModified":"2022-08-08T16:12:20+07:00"},{"@type":"WebSite","@id":"https:\/\/www.makeriot2020.com\/#website","url":"https:\/\/www.makeriot2020.com\/","name":"Maker and IOT Ideas","description":"Infinite possibilities, waiting to be explored","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.makeriot2020.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"Maker and IOT Ideas - Infinite possibilities, waiting to be explored","og:type":"article","og:title":"Using a Rotary Encoder - Maker and IOT Ideas","og:description":"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one","og:url":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/","og:image":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","og:image:secure_url":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg","og:image:width":165,"og:image:height":93,"article:published_time":"2022-08-08T09:12:14+00:00","article:modified_time":"2022-08-08T09:12:20+00:00","twitter:card":"summary_large_image","twitter:title":"Using a Rotary Encoder - Maker and IOT Ideas","twitter:description":"As part of an ongoing project, I recently designed an expander card for my ESP-12E I2C Base. I am referring to this device( Atmega 328P Base PWM Controller Card). At the time of writing that article, I have not released any of the code for the project. This is a very short post, showing one","twitter:image":"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/06\/LogoSmall.jpg"},"aioseo_meta_data":{"post_id":"17962","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"},\"blockGraphs\":[]}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-08-08 09:12:24","updated":"2026-06-29 02:59:44","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.makeriot2020.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/\" title=\"Uncategorized\">Uncategorized<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUsing a Rotary Encoder\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.makeriot2020.com"},{"label":"Uncategorized","link":"https:\/\/www.makeriot2020.com\/index.php\/category\/uncategorized\/"},{"label":"Using a Rotary Encoder","link":"https:\/\/www.makeriot2020.com\/index.php\/2022\/08\/08\/using-a-rotary-encoder\/"}],"_links":{"self":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/17962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/comments?post=17962"}],"version-history":[{"count":0,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/17962\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media\/17859"}],"wp:attachment":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media?parent=17962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/categories?post=17962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/tags?post=17962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}