|
43 | 43 | // include the library code: |
44 | 44 | #include <LiquidCrystal.h> |
45 | 45 |
|
46 | | -// initialize the library with the numbers of the interface pins |
47 | | -// initialize the library with the arduino pin numbers of the LCD interface pins |
48 | | -const int rs=12, en=11, d4=5, d5=4, d6=3, d7=2; |
49 | | -LiquidCrystal lcd(rs,en,d4,d5,d6,d7); |
| 46 | +// initialize the library by associating any needed LCD interface pin |
| 47 | +// with the arduino pin number it is connected to |
| 48 | +const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; |
| 49 | +LiquidCrystal lcd(rs, en, d4, d5, d6, d7); |
50 | 50 |
|
51 | 51 | // make some custom characters: |
52 | 52 | byte heart[8] = { |
@@ -118,10 +118,10 @@ void setup() { |
118 | 118 | lcd.createChar(3, armsDown); |
119 | 119 | // create a new character |
120 | 120 | lcd.createChar(4, armsUp); |
121 | | - |
| 121 | + |
122 | 122 | // set the cursor to the top left |
123 | | - lcd.setCursor(0,0); |
124 | | - |
| 123 | + lcd.setCursor(0, 0); |
| 124 | + |
125 | 125 | // Print a message to the lcd. |
126 | 126 | lcd.print("I "); |
127 | 127 | lcd.write(byte(0)); // when calling lcd.write() '0' must be cast as a byte |
|
0 commit comments