{"id":7334,"date":"2022-02-12T04:21:47","date_gmt":"2022-02-12T04:21:47","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=7334"},"modified":"2023-08-08T17:24:25","modified_gmt":"2023-08-08T11:54:25","slug":"fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/","title":{"rendered":"FSM Lecture 33: Exercise-003 Implementing LCD functions Part 2"},"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;\"><strong>Exercise-003 Implementing LCD functions Part 2<\/strong><\/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-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;\">In this article, let\u2019s continue implementing the LCD functions.<\/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=\"color: #000000;\"><span style=\"color: #000080;\"><b>lcd_set_cursor()<\/b><\/span><span style=\"font-weight: 400;\"> \u2192 you must first mention the column and then row for the library <\/span><b>setCursor<\/b><span style=\"font-weight: 400;\"> method.&nbsp;<\/span><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"color: #000000;\"><span style=\"color: #000080;\"><b>lcd_no_auto_scroll() <\/b><\/span><span style=\"font-weight: 400;\">\u2192 you have to access the <strong>noAutoScroll<\/strong><\/span><strong>() <\/strong><span style=\"font-weight: 400;\">method.<\/span><\/span><\/li>\n<\/ul>\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 aria-level=\"1\"><span style=\"color: #000000;\"><strong><span style=\"color: #000080;\">lcd_begin()<\/span>&nbsp;<\/strong> \u2192 <span style=\"font-weight: 400;\">And for the lcd_begin() as shown in Figure 1, this initializes the interface to the LCD screen and specifies the dimensions (width and height) of the display. <\/span>begin()<span style=\"font-weight: 400;\"> needs to be called before any other LCD library commands.<span style=\"color: #000000;\">&nbsp;<\/span><\/span>Before using any of the methods, you should use this method first. And you have to pass two arguments, a number of columns and the number of rows your LCD has. I will use lcd_begin(uint8_t cols, uint8_t rows). You have to mention lcd.begin(cols, rows).<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_7337\" aria-describedby=\"caption-attachment-7337\" style=\"width: 637px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-7337\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/begin.png\" alt=\"begin()\" width=\"637\" height=\"331\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png 1737w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-300x156.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-768x398.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-1024x531.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-600x311.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-120x62.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-500x259.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-200x104.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-400x207.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-800x415.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin-1200x622.png 1200w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><figcaption id=\"caption-attachment-7337\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. begin()<\/span><\/figcaption><\/figure>\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=\"color: #000000;\"><span style=\"color: #000080;\"><b>lcd_move_cursor_R_to_L<\/b><\/span><span style=\"font-weight: 400;\"> \u2192 <\/span><span style=\"font-weight: 400;\">And then move the cursor right to left. Whenever you print a character to the display, the cursor moves from right to left if you call <\/span><b>lcd.rightToLeft()<\/b><span style=\"font-weight: 400;\"> function. It\u2019s a configuration function.&nbsp;<\/span><\/span><\/li>\n<\/ul>\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=\"color: #000000;\"><span style=\"color: #000080;\"><b>lcd_move_cursor_L_to_R<\/b><\/span><span style=\"font-weight: 400;\"> \u2192 <\/span><span style=\"font-weight: 400;\">You can make the cursor move from left to right instead, which is also by default, then you can call the <strong>lcd.LeftToRight<\/strong><\/span><b>()<\/b><span style=\"font-weight: 400;\"> function.&nbsp;<\/span><\/span><\/li>\n<\/ul>\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 aria-level=\"1\"><span style=\"color: #000000;\"><span style=\"color: #000080;\"><strong>lcd_cursor_off <\/strong><\/span>\u2192 <span style=\"font-weight: 400;\">If you don&#8217;t want to see the cursor on display, call the lcd_cursor_off function, which calls the LCD object&#8217;s <strong>noCursor()<\/strong> method.<\/span><\/span><\/li>\n<\/ul>\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=\"color: #000000;\"><span style=\"color: #000080;\"><b>lcd_cursor_blinkoff<\/b><\/span><span style=\"font-weight: 400;\"> \u2192 If you don\u2019t want to blink the cursor, then go for the <strong>noBlink()<\/strong> method.<\/span><\/span><\/li>\n<\/ul>\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 aria-level=\"1\"><span style=\"color: #000000;\"><span style=\"color: #000080;\"><strong>lcd_print_number<\/strong><\/span> \u2192 <span style=\"font-weight: 400;\">If you want to print any number, you can use lcd_print with the argument of type integer. The method is <strong>lcd.print(num)<\/strong>.<\/span><\/span><\/li>\n<\/ul>\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 aria-level=\"1\"><span style=\"color: #000000;\"><span style=\"color: #000080;\"><strong>lcd_print_string<\/strong><\/span> \u2192 <span style=\"font-weight: 400;\">And print_string. It doesn\u2019t matter whether you want to print a character, a string, or a number; only one method is print().<\/span><\/span><\/li>\n<\/ul>\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> lcd_scroll_right(<span style=\"color: #ff99cc;\">void<\/span>){\r\n   lcd.scrollDisplayRight(); \r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_set_cursor(<span style=\"color: #ff99cc;\">int<\/span> c, <span style=\"color: #ff99cc;\">int<\/span> r){ \r\n   lcd.setCursor(c,r);\r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_no_auto_scroll(<span style=\"color: #ff99cc;\">void<\/span>){ \r\n   lcd.noAutoscroll(); \r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_begin(<span style=\"color: #ff99cc;\">void<\/span>){\r\n   lcd.begin(cols,rows);\r\n}\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_move_cursor_R_to_L(<span style=\"color: #ff99cc;\">void<\/span>){ \r\n   lcd.rightToLeft();\r\n}\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_move_cursor_L_to_R(<span style=\"color: #ff99cc;\">void<\/span>){ \r\n   lcd.leftToRight(); \r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_cursor_off(<span style=\"color: #ff99cc;\">void<\/span>){\r\n   lcd.noCursor(); \r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_cursor_blinkoff(<span style=\"color: #ff99cc;\">void<\/span>){ \r\n   lcd.noBlink(); \r\n} \r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_print_number(<span style=\"color: #ff99cc;\">int<\/span> num){\r\n   lcd.print(num);\r\n}\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_print_string(<span style=\"color: #ff99cc;\">String<\/span> s){\r\n   lcd.print(s); \r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\">Lcd.cpp code<\/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;\">#ifndef<\/span> LCD_H\r\n<span style=\"color: #ff99cc;\">#define<\/span> LCD_H\r\n<span style=\"color: #ff99cc;\">#include<\/span>&lt;Arduino.h&gt;\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_clear(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_print_char(<span style=\"color: #ff99cc;\">char<\/span> c);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_scroll_left(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_scroll_right(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_set_cursor(<span style=\"color: #ff99cc;\">int<\/span> c, <span style=\"color: #ff99cc;\">int<\/span> r);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_no_auto_scroll(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_begin(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_move_cursor_R_to_L(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_move_cursor_L_to_R(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_cursor_off(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_cursor_blinkoff(<span style=\"color: #ff99cc;\">void<\/span>);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_print_number(<span style=\"color: #ff99cc;\">int<\/span> num);\r\n<span style=\"color: #ff99cc;\">void<\/span> lcd_print_string(<span style=\"color: #ff99cc;\">String<\/span> s);\r\n\r\n<span style=\"color: #ff99cc;\">#endif<\/span><\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">Lcd.h code<\/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;\">The lcd.h code is shown above.&nbsp; In lcd_begin, you write&nbsp; uint8_t cols, uint8_t rows.&nbsp; You also have to add #include&lt;Arduino.h&gt;.&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;\">We have implemented lcd.cpp and lcd.h.<\/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;\">Now, go to our main.cpp and complete the \u2018display_init\u2019 function first.<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&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;\">#include<\/span> \"main.h\"\r\n<span style=\"color: #ff99cc;\">#include<\/span> \"lcd.h\"\r\n\r\n<span style=\"color: #ff99cc;\">static void<\/span> protimer_event_dispatcher(protimer_t *const mobj,event_t const *const e);\r\n<span style=\"color: #ff99cc;\">static<\/span> uint8_t process_button_pad_value(<span style=\"color: #008000;\">uint8_t<\/span> btn_pad_value);\r\n<strong><span style=\"color: #ff99cc;\">static<\/span> void display_init(<span style=\"color: #ff99cc;\">void<\/span>);<\/strong>\r\n\r\n<span style=\"color: #008000;\">\/*Main application object *\/<\/span>\r\n<span style=\"color: #ff99cc;\">static<\/span> protimer_t protimer;\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> setup() {\r\n <span style=\"color: #008000;\"> \/\/ put your setup code here, to run once:<\/span>\r\n  Serial.begin(115200);\r\n<strong>  display_init();<\/strong><\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">display_init() function<\/span><\/p>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&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;\">Let\u2019s implement at the bottom \u2018display_init\u2019. Before calling any LCD methods, you first have to initialize the LCD.<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #ff99cc;\">static void<\/span> display_init(<span style=\"color: #ff99cc;\">void<\/span>)\r\n{\r\n&nbsp; &nbsp;lcd_begin(16,2);\r\n&nbsp; &nbsp;lcd_clear();\r\n&nbsp; &nbsp;lcd_move_cursor_L_to_R();\r\n&nbsp; &nbsp;lcd_set_cursor(0,0);\r\n&nbsp; &nbsp;lcd_no_auto_scroll();\r\n&nbsp; &nbsp;lcd_cursor_off();\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">display_init 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;\">Many initialization commands need to be sent to the LCD before using other functionalities of the LCD like sending a command or sending a text to display.&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=\"font-weight: 400; color: #000000;\">All those things can be done using the library&#8217;s LCD begin() method. Let&#8217;s access all the wrapper functions. lcd_begin()you have to pass 16,2. That&#8217;s our LCD. And after this line, you can send whatever command you want.<\/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;\">After lcd_begin(), I clear the LCD, and the move cursor is set for the left to right. Why left to right? Because, look at Figure 2, that is our LCD (16&#215;2 LCD), and there is a left side and right side as shown.<\/span><\/p>\n<figure id=\"attachment_7342\" aria-describedby=\"caption-attachment-7342\" style=\"width: 663px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\" wp-image-7342\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/Figure-6-6.png\" alt=\" Move cursor left to right example \" width=\"663\" height=\"265\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6.png 1715w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-300x120.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-768x307.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-1024x409.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-600x240.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-120x48.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-500x200.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-200x80.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-400x160.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-800x320.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-6-6-1200x479.png 1200w\" sizes=\"(max-width: 663px) 100vw, 663px\" \/><figcaption id=\"caption-attachment-7342\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Move cursor left to right example<\/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;\">The cursor is in the first character; let\u2019s say \u2018s,\u2019 the cursor moves to the right. It comes over the second character. That is the default nature of the LCD.<\/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;\">And lcd_set_cursor to the 0 0 location(as shown above code snippet). That configures the coordinates of the LCD, which internally uses a set cursor.<\/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;\">For example, if you want to set the cursor here(as shown in figure 3), the coordinates are 1st row and 11th column. The first argument is column number, and then it is row.&nbsp;<\/span><\/p>\n<figure id=\"attachment_7343\" aria-describedby=\"caption-attachment-7343\" style=\"width: 699px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\" wp-image-7343\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/Figure-7-3.png\" alt=\"Set cursor example\" width=\"699\" height=\"249\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3.png 1701w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-300x107.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-768x273.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-1024x364.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-600x213.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-120x43.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-500x178.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-200x71.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-400x142.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-800x285.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Figure-7-3-1200x427.png 1200w\" sizes=\"(max-width: 699px) 100vw, 699px\" \/><figcaption id=\"caption-attachment-7343\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Set cursor example<\/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=\"color: #000000;\"><span style=\"font-weight: 400;\">And <\/span><b>lcd_no_auto_scroll()<\/b><span style=\"font-weight: 400;\"> turns off the scrolling of the display. And<\/span><b> lcd_cursor_off()<\/b><span style=\"font-weight: 400;\"> turns off the visibility of the cursor. The cursor won\u2019t appear on display. That is the display_init.<\/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;\">Our final task is to implement the helper functions like display_time, display_message, display_clear, and do_beep.&nbsp;&nbsp;<\/span><\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 40px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>display_clear :<\/b><\/span><\/p>\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;\">display_clear&nbsp; is very simple. You just call lcd_display_clear. The method is lcd.clear();<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; line-height: 36px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>display_time:<\/b><\/span><\/p>\n<figure id=\"attachment_7344\" aria-describedby=\"caption-attachment-7344\" style=\"width: 649px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-7344\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/display-time.png\" alt=\"display_time\" width=\"649\" height=\"190\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time.png 1707w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-300x88.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-768x225.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-1024x301.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-600x176.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-120x35.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-500x147.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-200x59.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-400x117.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-800x235.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-time-1200x352.png 1200w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><figcaption id=\"caption-attachment-7344\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. display_time<\/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;\">The time has to be displayed in a minute and second fashion. There is no field for the hour information. mmm(minutes), ss(seconds), there is one colon (:) as shown in Figure 4. The time must appear in row 0, and it should start at column 5 and end at column 10.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_7345\" aria-describedby=\"caption-attachment-7345\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7345 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/IDLE-state.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"580\" height=\"205\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state.png 1709w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-300x106.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-768x271.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-1024x361.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-600x212.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-120x42.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-500x176.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-200x71.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-400x141.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-800x282.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/IDLE-state-1200x423.png 1200w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-7345\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Display time in IDLE state<\/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;\">And when it is in the IDLE state, it should show a set time. That set time must appear at these coordinates on display, as shown in Figure 5.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_7346\" aria-describedby=\"caption-attachment-7346\" style=\"width: 553px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7346 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/paused-state.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"553\" height=\"194\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state.png 1681w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-300x105.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-768x269.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-1024x359.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-600x210.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-120x42.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-500x175.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-200x70.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-400x140.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-800x280.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/paused-state-1200x420.png 1200w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><figcaption id=\"caption-attachment-7346\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Display time in Pause state<\/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;\">The timer is set for 100 minutes 0 seconds. Whenever it enters the paused state, a message should appear here \u201cpaused\u201d at these coordinates, as shown in Figure 6.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_7347\" aria-describedby=\"caption-attachment-7347\" style=\"width: 534px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7347 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/Stat-state.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"534\" height=\"186\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state.png 1707w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-300x105.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-768x268.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-1024x357.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-600x209.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-120x42.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-500x174.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-200x70.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-400x139.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-800x279.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/Stat-state-1200x418.png 1200w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><figcaption id=\"caption-attachment-7347\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Display time in STAT state<\/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;\">Whenever the application is in a STAT state, the message should appear at these coordinates of the LCD, as shown in Figure 7.<\/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;\">How to convert the current time variable to minutes and seconds?<\/span><\/p>\n<figure id=\"attachment_7348\" aria-describedby=\"caption-attachment-7348\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7348 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/convert-time.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"595\" height=\"341\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time.png 1709w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-300x172.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-768x441.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-1024x588.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-600x344.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-120x69.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-500x287.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-200x115.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-400x230.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-800x459.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/convert-time-1200x689.png 1200w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><figcaption id=\"caption-attachment-7348\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Convert current time variable to minutes and seconds<\/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;\">Let&#8217;s assume the current time is 125. Then, second = curr_time%60, which gives you 5. And minute = curr_time\/60, the integer division gives you 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=\"font-weight: 400; color: #000000;\">125 means \u2192 2 minutes, 5 seconds. It should be displayed like 002:05. Like that, as shown in Figure 8. That&#8217;s how you convert current time to seconds and minutes while displaying in the display_time functions.<\/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: #000080;\"><b>display_message:<\/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=\"font-weight: 400; color: #000000;\">For the display_message, there is one piece of information we have to provide. In the application, the messages are getting printed on different coordinates. Take column number and row number here. We will modify the display_message function like this, as shown in Figure 9.<\/span><\/p>\n<figure id=\"attachment_7349\" aria-describedby=\"caption-attachment-7349\" style=\"width: 682px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7349 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/display-message.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"682\" height=\"171\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message.png 1193w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-300x75.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-768x192.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-1024x257.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-600x150.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-120x30.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-500x125.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-200x50.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-400x100.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/display-message-800x201.png 800w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><figcaption id=\"caption-attachment-7349\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Display message function<\/span><\/figcaption><\/figure>\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;\">For Example, Look at Figure 6, here \u201cpaused.\u201d The column is 5; the row is 1. You can modify that(shown in Figure 6).<\/span><\/p>\n<figure id=\"attachment_7350\" aria-describedby=\"caption-attachment-7350\" style=\"width: 694px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7350 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/disply-message-1.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"694\" height=\"199\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1.png 1057w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-300x86.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-768x220.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-1024x294.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-600x172.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-120x34.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-500x143.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-200x57.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-400x115.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/disply-message-1-800x229.png 800w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><figcaption id=\"caption-attachment-7350\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. display_message example<\/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;\">Wherever we have used display_message, like this, you can modify that(Figure 10).<\/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: 40px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>do_beep():<\/b><\/span><\/p>\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;\">And for the beep, you can use the tone function of the Arduino.<\/span><\/p>\n<figure id=\"attachment_7351\" aria-describedby=\"caption-attachment-7351\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7351 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/02\/tone-function.png\" alt=\"Exercise-003 Implementing LCD functions Part 2\" width=\"700\" height=\"251\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function.png 1287w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-300x107.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-768x275.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-1024x367.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-600x215.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-120x43.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-500x179.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-200x72.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-400x143.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-800x287.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/tone-function-1200x430.png 1200w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption id=\"caption-attachment-7351\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. tone function<\/span><\/figcaption><\/figure>\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=\"color: #000000;\"><span style=\"font-weight: 400;\">See Figure 11; You have to mention the <\/span><b>pin<\/b><span style=\"font-weight: 400;\"> connected to the buzzer; <\/span><b>frequency<\/b><span style=\"font-weight: 400;\"> is the frequency of the square wave fed to this pin, which drives the buzzer. And the <\/span><b>duration<\/b><span style=\"font-weight: 400;\"> of how long the beep should come out.&nbsp;<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 20px; line-height: 25px;\"><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=\"color: #3366ff;\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span>&nbsp;<\/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 Implementing LCD functions Part 2 &nbsp; &nbsp; In this article, let\u2019s continue implementing the LCD functions. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.&nbsp; lcd_no_auto_scroll() \u2192 you have to access the noAutoScroll() method. lcd_begin()&nbsp; \u2192 And for the lcd_begin() as shown in Figure 1, this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7337,"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-7334","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>Exercise: LCD functions implementation Part 2 | FSM<\/title>\n<meta name=\"description\" content=\"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.\" \/>\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-33-exercise-003-implementing-lcd-functions-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exercise: LCD functions implementation Part 2 | FSM\" \/>\n<meta property=\"og:description\" content=\"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/\" \/>\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-12T04:21:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-08T11:54:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1737\" \/>\n\t<meta property=\"og:image:height\" content=\"901\" \/>\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=\"7 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-33-exercise-003-implementing-lcd-functions-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FSM Lecture 33: Exercise-003 Implementing LCD functions Part 2\",\"datePublished\":\"2022-02-12T04:21:47+00:00\",\"dateModified\":\"2023-08-08T11:54:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/\"},\"wordCount\":1168,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/begin.png\",\"keywords\":[\"Finite state Machine(FSM)\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/\",\"name\":\"Exercise: LCD functions implementation Part 2 | FSM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/begin.png\",\"datePublished\":\"2022-02-12T04:21:47+00:00\",\"dateModified\":\"2023-08-08T11:54:25+00:00\",\"description\":\"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/begin.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/begin.png\",\"width\":1737,\"height\":901,\"caption\":\"Figure 1. begin()\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FSM Lecture 33: Exercise-003 Implementing LCD functions Part 2\"}]},{\"@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":"Exercise: LCD functions implementation Part 2 | FSM","description":"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.","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-33-exercise-003-implementing-lcd-functions-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Exercise: LCD functions implementation Part 2 | FSM","og_description":"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.","og_url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2022-02-12T04:21:47+00:00","article_modified_time":"2023-08-08T11:54:25+00:00","og_image":[{"width":1737,"height":901,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.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":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FSM Lecture 33: Exercise-003 Implementing LCD functions Part 2","datePublished":"2022-02-12T04:21:47+00:00","dateModified":"2023-08-08T11:54:25+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/"},"wordCount":1168,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png","keywords":["Finite state Machine(FSM)"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/","url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/","name":"Exercise: LCD functions implementation Part 2 | FSM","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png","datePublished":"2022-02-12T04:21:47+00:00","dateModified":"2023-08-08T11:54:25+00:00","description":"Implementing LCD functions Part 2. lcd_set_cursor() \u2192 you must first mention the column and then row for the library setCursor method.","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/02\/begin.png","width":1737,"height":901,"caption":"Figure 1. begin()"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-33-exercise-003-implementing-lcd-functions-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FSM Lecture 33: Exercise-003 Implementing LCD functions Part 2"}]},{"@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\/7334","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=7334"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/7334\/revisions"}],"predecessor-version":[{"id":12863,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/7334\/revisions\/12863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/7337"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=7334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=7334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=7334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}