Skip to content

Instantly share code, notes, and snippets.

@komponenrobot
Created May 2, 2020 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komponenrobot/a3bccd8233c4ce7c572bf71ad8503196 to your computer and use it in GitHub Desktop.
Save komponenrobot/a3bccd8233c4ce7c572bf71ad8503196 to your computer and use it in GitHub Desktop.
lcd_i2c_prot
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,16,2);
int dataInteger = 100;
float dataFloat = 1.5;
char dataChar = 'c';
void setup()
{
lcd.init();
lcd.setCursor(0,0);
lcd.print("RobotikID");
}
void loop()
{
for(int a=0; a<16; a++){
lcd.clear();
lcd.setCursor(a,0);
lcd.print("Running Text");
delay(500);
}
lcd.setCursor(0,1);
lcd.print(dataInteger);
lcd.setCursor(3,1);
lcd.print(dataFloat);
lcd.setCursor(8,1);
lcd.print(dataChar);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment