Skip to content

Commit c3d3016

Browse files
committedMay 14, 2015
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.
1 parent 54da4d6 commit c3d3016

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎libraries/LiquidCrystal/examples/setCursor/setCursor.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
can usually tell them by the 16-pin interface.
88
99
This sketch prints to all the positions of the LCD using the
10-
setCursor(0 method:
10+
setCursor() method:
1111
1212
The circuit:
1313
* LCD RS pin to digital pin 12
@@ -56,9 +56,9 @@ void loop() {
5656
// loop from ASCII 'a' to ASCII 'z':
5757
for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) {
5858
// loop over the columns:
59-
for (int thisCol = 0; thisCol < numRows; thisCol++) {
59+
for (int thisRow = 0; thisRow < numRows; thisRow++) {
6060
// loop over the rows:
61-
for (int thisRow = 0; thisRow < numCols; thisRow++) {
61+
for (int thisCol = 0; thisCol < numCols; thisCol++) {
6262
// set the cursor position:
6363
lcd.setCursor(thisCol, thisRow);
6464
// print the letter:

0 commit comments

Comments
 (0)
Please sign in to comment.