From c3d3016049855f8624bee23452ac71635c15d4e8 Mon Sep 17 00:00:00 2001 From: Ish Gupta Date: Thu, 14 May 2015 18:30:17 +0530 Subject: [PATCH] Updated cursor.ino Previous commit broke the actual functionality. The code was confusing and worked until the previous commit. The changes make it logically and functionally correct. --- libraries/LiquidCrystal/examples/setCursor/setCursor.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino index 4790b68b8..df75f7fe9 100644 --- a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino +++ b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino @@ -7,7 +7,7 @@ can usually tell them by the 16-pin interface. This sketch prints to all the positions of the LCD using the - setCursor(0 method: + setCursor() method: The circuit: * LCD RS pin to digital pin 12 @@ -56,9 +56,9 @@ void loop() { // loop from ASCII 'a' to ASCII 'z': for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) { // loop over the columns: - for (int thisCol = 0; thisCol < numRows; thisCol++) { + for (int thisRow = 0; thisRow < numRows; thisRow++) { // loop over the rows: - for (int thisRow = 0; thisRow < numCols; thisRow++) { + for (int thisCol = 0; thisCol < numCols; thisCol++) { // set the cursor position: lcd.setCursor(thisCol, thisRow); // print the letter: