{"id":7243,"date":"2022-02-09T08:08:45","date_gmt":"2022-02-09T08:08:45","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=7243"},"modified":"2023-08-08T16:42:02","modified_gmt":"2023-08-08T11:12:02","slug":"fsm-lecture-30-exercise-003-button-software-debouncing-implementation","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/","title":{"rendered":"FSM Lecture 30: Exercise-003 Button software de-bouncing implementation"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 35px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 30px; border-width: 0px; line-height: 50px;\"><span style=\"color: #000080;\">Exercise-003 Button software de-bouncing implementation<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In this article, we will implement software button debouncing.<\/span><\/p>\n<figure id=\"attachment_7246\" aria-describedby=\"caption-attachment-7246\" style=\"width: 676px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-7246\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png\" alt=\"Creation of state machine diagram\" width=\"676\" height=\"593\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png 676w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-300x263.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-600x526.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-120x105.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-500x439.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-200x175.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram-400x351.png 400w\" sizes=\"(max-width: 676px) 100vw, 676px\" \/><figcaption id=\"caption-attachment-7246\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Creation of state machine diagram<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Just right-click over the project and go to Create diagram and Statemachine diagram(shown in Figure 1); you can do that.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_7247\" aria-describedby=\"caption-attachment-7247\" style=\"width: 1033px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-7247\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/figure-2.png\" alt=\"State machine diagram of pins different states\" width=\"1033\" height=\"759\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2.png 1033w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-300x220.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-768x564.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-1024x752.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-600x441.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-120x88.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-500x367.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-200x147.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-400x294.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/figure-2-800x588.png 800w\" sizes=\"(max-width: 1033px) 100vw, 1033px\" \/><figcaption id=\"caption-attachment-7247\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. State machine diagram of pins different states<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\">&nbsp;<span style=\"color: #000000;\">A state machine diagram can represent pins in different states, as shown in Figure 2. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\"><span style=\"color: #000000;\">We will not implement this as a standard UML specification-based state machine. We will implement this as a normal function, but I just wanted to let you know that the pin debouncing can also be represented in a state machine diagram.&nbsp;<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Here, we have got three states. NOT PRESSED, PRESSED, and BOUNCE. Assume that this is implemented as a function, and the function receives the button pad value.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">First, the pin will be in the Not pressed state, and when the button pad value is non-zero, that means someone has pressed the buttons. So, there will be a Transition to a bounce state. And the action is set_curr_time. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">But the key point here is that when the pin is in the Not pressed state and if the button pad value becomes non-zero, the state machine moves to the Bounce state. And in the Bounce state, it has to wait for 50 milliseconds, so that&#8217;s the bounce period. 50 milliseconds is spent here. The beginning of that 50 milliseconds is marked by this set current time. So, we can do this using millis().<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">While the state machine is in the Bounce state, after 50 milliseconds, it has to re-verify the button pad value once again (the fresh button pad value). If it is 0, that means no one has pressed the button. That\u2019s why it goes to a Not pressed state. But if the button pad value is non-zero after 50 milliseconds, it goes to the Pressed state. That indicates someone has really pressed the button.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">And while it is in the Pressed state, it stays there until the button pad value returns to 0.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When someone releases the button, the button pad value becomes 0, which indicates that someone has released the button. That\u2019s why the Transition value comes to a bounce state again. Because you have to debounce the release state also. And the beginning of the time is marked by the set_curr_time function.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now we will implement this as a small function. Let\u2019s go to the code. We will create another enum in main.h\u2014 typedef enum as shown below.&nbsp;<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\"><span style=\"color: #ff99cc;\">typedef enum<\/span>{\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT_PRESSED,\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOUNCE,\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PRESSED\r\n}button_state_t;<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\"> create enum function in main.h<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><span style=\"color: #ff99cc;\">static<\/span> <span style=\"color: #339966;\">uint8_t<\/span> process_button_pad_value(<span style=\"color: #339966;\">uint8_t<\/span> btn_pad_value)\r\n{\r\n   <span style=\"color: #ff99cc;\">static<\/span> button_state_t btn_sm_state = NOT_PRESSED;\r\n  <span style=\"color: #ff99cc;\"> static<\/span><span style=\"color: #339966;\"> uint32_t<\/span> curr_time = millis();\r\n\r\n   <span style=\"color: #ff9900;\">switch<\/span>(btn_sm_state){\r\n   <span style=\"color: #ff9900;\"> case<\/span> NOT_PRESSED:{\r\n    <span style=\"color: #ff99cc;\"> if<\/span>(btn_pad_value){\r\n       btn_sm_state = BOUNCE;\r\n       curr_time = millis();\r\n      }\r\n     <span style=\"color: #ff9900;\">break<\/span>;\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">Case NOT_PRESSED state<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">We have already defined a function <\/span><b>process_button_pad_value<\/b><span style=\"font-weight: 400;\">; inside this, we will do that. First, I will take a variable <\/span><b>static button_state_t btn_sm_state = NOT_PRESSED<\/b><span style=\"font-weight: 400;\">. And we will take one more variable here to store the current time <\/span><b>static uint32 curr_time = millis();<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Now let&#8217;s use the switch case. <\/span><b>switch(btn_sm_state)<\/b><span style=\"font-weight: 400;\">. Let&#8217;s write different cases for NOT PRESSED, BOUNCE, and PRESSED states.<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When it is Not pressed, the statemachine says that if the btn_pad_value is non zero, there is a transition.&nbsp; Here we have to set the current time. That will be used in the BOUNCE state to timeout after 50 milliseconds. After that, we have to put a break statement (Figure 1).<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><span style=\"color: #ff9900;\"> case<\/span> BOUNCE:{\r\n   <span style=\"color: #ff99cc;\"> if<\/span>(millis() - curr_time &gt;= 50 ){\r\n      <span style=\"color: #339966;\"> \/\/50ms has passed<\/span> \r\n      <span style=\"color: #ff99cc;\"> if<\/span>(btn_pad_value){\r\n         btn_sm_state = PRESSED;\r\n  <span style=\"color: #ff99cc;\">       return<\/span> btn_pad_value;\r\n        }\r\n       <span style=\"color: #ff99cc;\"> else<\/span>\r\n          btn_sm_state = NOT_PRESSED;\r\n     }\r\n     <span style=\"color: #ff9900;\">break<\/span>;\r\n }\r\n\r\n<span style=\"color: #ff9900;\"> case<\/span> PRESSED:{  \r\n    <span style=\"color: #ff99cc;\">if<\/span>(!btn_pad_value){\r\n      btn_sm_state = BOUNCE;\r\n      curr_time = millis();\r\n    }  \r\n    <span style=\"color: #ff9900;\">break<\/span>;\r\n}\r\n\r\n} \r\n<span style=\"color: #ff99cc;\">return<\/span> 0;\r\n}\r\n\r\n<\/pre>\n<p class=\"\" style=\"text-align: center;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Case BOUNCE and PRESSED state<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When it comes to the BOUNCE, it should not do anything until the 50 milliseconds passes. That&#8217;s why let&#8217;s do nothing until 50 milliseconds passes (shown in Figure 2).&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Now, here I recheck the button&nbsp; pad value. So, <\/span><b>if(btn_pad_value)<\/b><span style=\"font-weight: 400;\">,if it is set, then go to Pressed state.&nbsp; <\/span><b>btn_sm_state = PRESSED;&nbsp; else btn_sm_state = NOT_PRESSED;<\/b><span style=\"font-weight: 400;\"> and then <\/span><b>break<\/b><span style=\"font-weight: 400;\">;<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">While it is in the <span style=\"color: #000000;\">PRESSED state<\/span>, if btn_pad_value is 0, it must go to the BOUNCE state. And since it is going to the Bounce state, you have to reinitialize the current time. Because this marks the starting point, the 50 milliseconds are recalculated. So, millis(). Put a break statement.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">And also <\/span><b>process_button_pad_value<\/b><span style=\"font-weight: 400;\"> function returns something. See Figure 5, If it is really Pressed, if the&nbsp; <\/span><b>process_button_pad_value<\/b><span style=\"font-weight: 400;\"> function decides that after 50 milliseconds, something has really Pressed, then it has to return the btn_pad_value.&nbsp;<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Because this btn_pad_value is a value after the software debounces, after waiting for 50 milliseconds, that\u2019s why let\u2019s return that value back to the caller.&nbsp;&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">And <\/span><b>process_button_pad_value <\/b><span style=\"font-weight: 400;\">function by default returns 0.&nbsp;<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\"><span style=\"color: #ff99cc;\">void<\/span> setup() {\r\n  <span style=\"color: #008000;\"> \/\/ put your setup code here, to run once:<\/span>\r\n  <span style=\"color: #ff9900;\"> Serial<\/span>.begin(115200);\r\n   display_init();\r\n   <span style=\"color: #ff9900;\">Serial<\/span>.println(\"Productive timer application\");\r\n   <span style=\"color: #ff9900;\">Serial<\/span>.println(\"===========================\");\r\n   pinMode(PIN_BUTTON1,INPUT);\r\n   pinMode(PIN_BUTTON2,INPUT);\r\n   pinMode(PIN_BUTTON3,INPUT);\r\n\r\n   protimer_init(&amp;protimer);\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">setup() function<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s give attention to implementing the lcd.c and lcd.h files. That will be our last implementation, and after that, we can test it.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">First of all, we will write the setup function. In the setup function, we have to do various setups.&nbsp;<\/span><\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Serial.begin(115200); If you are printing anything on a serial monitor, it is required.&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">And after that, we will print something. Serial.println(\u201cProductive timer application);&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">After that, we will use <\/span><b>the pinMode <\/b><span style=\"font-weight: 400;\">function of Arduino to configure the mode for the buttons. And now, let\u2019s use this pinMode(PIN_BUTTON1, INPUT); You have to do it three times.&nbsp;<\/span><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">And after that, you call protimer_init(&amp;protimer); function.<\/span><\/li>\n<\/ul>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">And in the <a href=\"http:\/\/fastbitlab.com\/fsm-lecture-31-adding-arduino-library-to-project-in-platformio\/\" target=\"_blank\" rel=\"noopener\">upcoming article<\/a>, we will explore the Arduino LCD library and try to use the Arduino LCD library methods in our project to drive our 16X2 LCD. And after that, we will test this project on the hardware.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 36px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000000;\"><strong>pinMode()<\/strong><\/span><\/p>\n<blockquote class=\"\">\n<p class=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Syntax:<\/span><span style=\"font-weight: 400;\">&nbsp; pinMode( pin, mode)<\/span><\/span><\/p>\n<\/blockquote>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">As you know, for the pinMode function, you have to provide \u2018pin,\u2019 and \u2018mode.\u2019 Mode is nothing but any of these values\u2192 INPUT, OUTPUT, INPUT_PULLUP. INPUT_PULLUP option is already available, so you need not use the external pullup resistors. But using external pullup resistors is usually generic because sometimes we don\u2019t know whether the microcontroller pin supports the internal pullup. So, you have to do more investigation on that pin. But, if you don\u2019t want to use those resistors of 10 kiloohms, you can use the option INPUT_PULLUP.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 20px; line-height: 28px;\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"color: #000000;\">C<span style=\"font-weight: 400;\">lick here: <\/span><\/span><span style=\"color: #3366ff;\"><a style=\"color: #3366ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Exercise-003 Button software de-bouncing implementation &nbsp; &nbsp; In this article, we will implement software button debouncing. Just right-click over the project and go to Create diagram and Statemachine diagram(shown in Figure 1); you can do that. &nbsp; &nbsp;A state machine diagram can represent pins in different states, as shown in Figure 2. We will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[17],"class_list":["post-7243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-finite-state-machine","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Button software debouncing implementation Exercise| FSM<\/title>\n<meta name=\"description\" content=\"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Button software debouncing implementation Exercise| FSM\" \/>\n<meta property=\"og:description\" content=\"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-09T08:08:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-08T11:12:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png\" \/>\n\t<meta property=\"og:image:width\" content=\"676\" \/>\n\t<meta property=\"og:image:height\" content=\"593\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FSM Lecture 30: Exercise-003 Button software de-bouncing implementation\",\"datePublished\":\"2022-02-09T08:08:45+00:00\",\"dateModified\":\"2023-08-08T11:12:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/\"},\"wordCount\":1063,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/creation-of-state-machine-diagram.png\",\"keywords\":[\"Finite state Machine(FSM)\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/\",\"name\":\"Button software debouncing implementation Exercise| FSM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/creation-of-state-machine-diagram.png\",\"datePublished\":\"2022-02-09T08:08:45+00:00\",\"dateModified\":\"2023-08-08T11:12:02+00:00\",\"description\":\"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/creation-of-state-machine-diagram.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/creation-of-state-machine-diagram.png\",\"width\":676,\"height\":593,\"caption\":\"Figure 1. Creation of state machine diagram\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FSM Lecture 30: Exercise-003 Button software de-bouncing implementation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Button software debouncing implementation Exercise| FSM","description":"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over","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:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/","og_locale":"en_US","og_type":"article","og_title":"Button software debouncing implementation Exercise| FSM","og_description":"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over","og_url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2022-02-09T08:08:45+00:00","article_modified_time":"2023-08-08T11:12:02+00:00","og_image":[{"width":676,"height":593,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FSM Lecture 30: Exercise-003 Button software de-bouncing implementation","datePublished":"2022-02-09T08:08:45+00:00","dateModified":"2023-08-08T11:12:02+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/"},"wordCount":1063,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png","keywords":["Finite state Machine(FSM)"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/","url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/","name":"Button software debouncing implementation Exercise| FSM","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png","datePublished":"2022-02-09T08:08:45+00:00","dateModified":"2023-08-08T11:12:02+00:00","description":"Exercise-003 Button software debouncing implementation. In this article, we will implement software button debouncing. Just right-click over","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/creation-of-state-machine-diagram.png","width":676,"height":593,"caption":"Figure 1. Creation of state machine diagram"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-30-exercise-003-button-software-debouncing-implementation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FSM Lecture 30: Exercise-003 Button software de-bouncing implementation"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/7243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=7243"}],"version-history":[{"count":4,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/7243\/revisions"}],"predecessor-version":[{"id":15339,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/7243\/revisions\/15339"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/7246"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=7243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=7243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=7243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}