User Tools

Site Tools


en-us_commands:reference:iclcdscrollright

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en-us_commands:reference:iclcdscrollright [2026/09/08 00:53] – 바깥 편집 127.0.0.1en-us_commands:reference:iclcdscrollright [2026/10/25 08:41] (current) – external edit 127.0.0.1
Line 14: Line 14:
  
 ===== Example ===== ===== Example =====
 +
 +This example connects a 20×4 PCF8574 character LCD at address ''0x27'' to the MPAINO-8A8R(T) I2C port. Change the ''IclcdBegin()'' arguments if your LCD has a different address or size.
  
 <code cpp> <code cpp>
-const uint8_t LCD_DEVICE = 0; +bool lcdReady = false;
-const uint8_t degreeChar[8] = {0x0C, 0x12, 0x12, 0x0C, 0, 0, 0, 0};+
  
 void setup() { void setup() {
-  if (!IclcdBegin(0x27, 20, 4, true, LCD_DEVICE)) return;  // Set the address and dimensions of the PCF8574 character LCD. +  lcdReady = IclcdBegin(0x27, 20, 4);  // Set the LCD address and display size. 
-  IclcdCreateChar(0, degreeChar, LCD_DEVICE);  // Register a custom character. +  if (lcdReady) IclcdPrint(F("Scrolling text"));  // Display text to observe the operation.
-  IclcdClear(LCD_DEVICE);  // Clear the LCD screen. +
-  IclcdHome(LCD_DEVICE);  // Move the cursor to the first position. +
-  IclcdDisplay(true, LCD_DEVICE);  // Turn the LCD display on or off. +
-  IclcdCursor(false, LCD_DEVICE);  // Show or hide the cursor. +
-  IclcdBlink(false, LCD_DEVICE);  // Enable or disable cursor blinking. +
-  IclcdBacklight(true, LCD_DEVICE);  // Turn the LCD backlight on or off. +
-  IclcdTextDirection(true, LCD_DEVICE);  // Set the direction in which characters are entered. +
-  IclcdAutoscroll(false, LCD_DEVICE);  // Enable or disable autoscroll.+
 } }
  
 void loop() { void loop() {
-  const float temperature = ntcReadf(0);  // Return the NTC 3950 10kΩ sensor temperature as a floating-point value in °C. +  if (!lcdReady) return; 
-  IclcdSetCursor(0, 0, LCD_DEVICE);  // Move the cursor to the specified column and row. +  IclcdScrollRight();  // Shift the display one column right. 
-  IclcdPrint(F("Temperature"), LCD_DEVICE);  // Print a string or number to the LCD. +  delay(500);
-  IclcdSetCursor(0, 1, LCD_DEVICE);  // Move the cursor to the specified column and row. +
-  IclcdPrint(temperature, 1, LCD_DEVICE);  // Print a string or number to the LCD. +
-  IclcdWrite(0, LCD_DEVICE);  // Output a character code or custom character. +
-  IclcdPrint('C', LCD_DEVICE);  // Print a string or number to the LCD. +
- +
-  if (Iup(0, IdigitalRead(0, 5))) IclcdScrollLeft(LCD_DEVICE);  // Shift the displayed content one position left. / Read the input repeatedly and update only if all samples match. If HIGH and LOW are mixed, retain the previous stable state. / Return true only at the instant the input changes from OFF to ON. +
-  if (Iup(1, IdigitalRead(1, 5))) IclcdScrollRight(LCD_DEVICE);  // Shift the displayed content one position right. / Read the input repeatedly and update only if all samples match. If HIGH and LOW are mixed, retain the previous stable state. / Return true only at the instant the input changes from OFF to ON. +
-  if (Iup(2, IdigitalRead(2, 5))) IclcdCommand(0x02, LCD_DEVICE);  // Read the input repeatedly and update only if all samples match. If HIGH and LOW are mixed, retain the previous stable state. / Send an LCD control command directly. / Return true only at the instant the input changes from OFF to ON.+
 } }
 </code> </code>
Line 58: Line 43:
 ===== Built-in Commands in the Same Category ===== ===== Built-in Commands in the Same Category =====
  
-  * [[:en-us_commands:reference:iclcdbegin|IclcdBegin() View detailed description]] +  * [[:en-us_commands:reference:iclcdbegin|IclcdBegin() reference]] 
-  * [[:en-us_commands:reference:iclcdclear|IclcdClear() View detailed description]] +  * [[:en-us_commands:reference:iclcdclear|IclcdClear() reference]] 
-  * [[:en-us_commands:reference:iclcdhome|IclcdHome() View detailed description]] +  * [[:en-us_commands:reference:iclcdhome|IclcdHome() reference]] 
-  * [[:en-us_commands:reference:iclcdsetcursor|IclcdSetCursor() View detailed description]] +  * [[:en-us_commands:reference:iclcdsetcursor|IclcdSetCursor() reference]] 
-  * [[:en-us_commands:reference:iclcddisplay|IclcdDisplay() View detailed description]] +  * [[:en-us_commands:reference:iclcddisplay|IclcdDisplay() reference]] 
-  * [[:en-us_commands:reference:iclcdcursor|IclcdCursor() View detailed description]] +  * [[:en-us_commands:reference:iclcdcursor|IclcdCursor() reference]] 
-  * [[:en-us_commands:reference:iclcdblink|IclcdBlink() View detailed description]] +  * [[:en-us_commands:reference:iclcdblink|IclcdBlink() reference]] 
-  * [[:en-us_commands:reference:iclcdbacklight|IclcdBacklight() View detailed description]] +  * [[:en-us_commands:reference:iclcdbacklight|IclcdBacklight() reference]] 
-  * [[:en-us_commands:reference:iclcdscrollleft|IclcdScrollLeft() View detailed description]] +  * [[:en-us_commands:reference:iclcdscrollleft|IclcdScrollLeft() reference]] 
-  * [[:en-us_commands:reference:iclcdtextdirection|IclcdTextDirection() View detailed description]] +  * [[:en-us_commands:reference:iclcdtextdirection|IclcdTextDirection() reference]] 
-  * [[:en-us_commands:reference:iclcdautoscroll|IclcdAutoscroll() View detailed description]] +  * [[:en-us_commands:reference:iclcdautoscroll|IclcdAutoscroll() reference]] 
-  * [[:en-us_commands:reference:iclcdcreatechar|IclcdCreateChar() View detailed description]] +  * [[:en-us_commands:reference:iclcdcreatechar|IclcdCreateChar() reference]] 
-  * [[:en-us_commands:reference:iclcdwrite|IclcdWrite() View detailed description]] +  * [[:en-us_commands:reference:iclcdwrite|IclcdWrite() reference]] 
-  * [[:en-us_commands:reference:iclcdcommand|IclcdCommand() View detailed description]] +  * [[:en-us_commands:reference:iclcdcommand|IclcdCommand() reference]] 
-  * [[:en-us_commands:reference:iclcdprint|IclcdPrint() View detailed description]]+  * [[:en-us_commands:reference:iclcdprint|IclcdPrint() reference]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/iclcdscrollright.1788796398.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki