User Tools

Site Tools


en-us_commands:reference:iclcdclear

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_commands:reference:iclcdclear [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:reference:iclcdclear [2026/09/12 23:27] (current) – 바깥 편집 127.0.0.1
Line 14: Line 14:
  
 ===== Example ===== ===== Example =====
 +
 +This example uses a PCF8574 character LCD at I²C address ''0x27''. Send ''c'' from Serial Monitor to clear the text on the display.
  
 <code cpp> <code cpp>
-bool IclcdBegin(uint8_t address, uint8_t columns, uint8_t rows, +bool lcdReady false
-                bool backlight true, uint8_t device = 0)+ 
-bool IclcdClear(uint8_t device = 0); +void setup() { 
-bool IclcdHome(uint8_t device = 0); +  Serial.begin(115200); 
-bool IclcdSetCursor(uint8_t columnuint8_t rowuint8_t device = 0); +  lcdReady = IclcdBegin(0x27204);  // Initialize the LCD and check the connection. 
-bool IclcdDisplay(bool on = true, uint8_t device = 0); +  if (!lcdReady{ 
-bool IclcdCursor(bool on = true, uint8_t device = 0)+    Serial.println(F("LCD not found")); 
-bool IclcdBlink(bool on = true, uint8_t device = 0); +    return
-bool IclcdBacklight(bool on = true, uint8_t device = 0)+  } 
-bool IclcdScrollLeft(uint8_t device = 0); +  IclcdPrint(F("Press c to clear"));  // Show text before clearing the display. 
-bool IclcdScrollRight(uint8_t device = 0); +
-bool IclcdTextDirection(bool leftToRight = true, uint8_t device = 0); + 
-bool IclcdAutoscroll(bool on = true, uint8_t device = 0)+void loop() { 
-bool IclcdCreateChar(uint8_t location, const uint8_t charmap[8], +  if (!lcdReady || !Serial.available()) return
-                     uint8_t device 0); +  if (Serial.read() !'c'return
-bool IclcdWrite(uint8_t value, uint8_t device = 0); +  if (IclcdClear()) {  // Clear the LCD screen. 
-bool IclcdCommand(uint8_t command, uint8_t device = 0); +    Serial.println(F("LCD cleared")); 
-bool IclcdPrint(...);+  } 
 +}
 </code> </code>
  
Line 44: Line 47:
   * On MPAINO, using D20/D21 for external interrupts prevents simultaneous I²C use.   * On MPAINO, using D20/D21 for external interrupts prevents simultaneous I²C use.
   * ''IclcdCommand()'' can change the LCD state directly. Use it only if you understand HD44780 commands.   * ''IclcdCommand()'' can change the LCD state directly. Use it only if you understand HD44780 commands.
 +
 +===== Built-in Commands in the Same Category =====
 +
 +  * [[:en-us_commands:reference:iclcdbegin|IclcdBegin() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdhome|IclcdHome() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdsetcursor|IclcdSetCursor() View detailed description]]
 +  * [[:en-us_commands:reference:iclcddisplay|IclcdDisplay() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdcursor|IclcdCursor() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdblink|IclcdBlink() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdbacklight|IclcdBacklight() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdscrollleft|IclcdScrollLeft() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdscrollright|IclcdScrollRight() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdtextdirection|IclcdTextDirection() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdautoscroll|IclcdAutoscroll() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdcreatechar|IclcdCreateChar() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdwrite|IclcdWrite() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdcommand|IclcdCommand() View detailed description]]
 +  * [[:en-us_commands:reference:iclcdprint|IclcdPrint() View detailed description]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/iclcdclear.1788785566.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki