microrobotics icon

CT0046LCD

microrobotics | PRO | 09/09/17 08:40:18 AM UTC | 0 ⭐ | 4216 👁️ | Never ⏰ | []
C |

600 B

|

None

|

0 👍

/

0 👎

 #include <Wire.h>
 #include "LiquidCrystal.h"
 
// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidCrystal lcd(0);
 
void setup() {
  // set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}
 
void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
 
  lcd.setBacklight(HIGH);
  delay(1000);
  lcd.setBacklight(LOW);
  delay(1000);
}

Comments