LCD — Arduino Uno simulation

An interactive Arduino Uno circuit simulation you can run free in your browser on Velxio, by joaquin-marin05.

Components

Sketch code

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
int Sensor1=A0;
float T;

byte grados[] = {
  B00111,
  B00101,
  B00111,
  B00000,
  B00000,
  B00000,
  B00000,
  B00000
};

byte ohi[] = {
  B00100,
  B11111,
  B00100,
  B11111,
  B10101,
  B10101,
  B01110,
  B00100
};

void setup() {
  lcd.init();
  lcd.begin(16,2);
  lcd.clear();
  lcd.noBacklight();
  lcd.setCursor(0, 0);
  lcd.print("MATY_KLEIIN :)");
  delay(2000);
  lcd.createChar(0,grados);
  lcd.createChar(1,ohi);
  Serial.begin(9600);
}

void loop()
{
  int Sensor1=A0;
  int Lectura1=analogRead(A0);
  int T=map(Lectura1, 0, 1023, 0, 100);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Temperatura: ");
  lcd.setCursor(0, 1);
  lcd.print(T);
  lcd.setCursor(3, 1);
  lcd.write(0);
  lcd.setCursor(4, 1);
  lcd.write(1);
  delay(500);
}

More projects by joaquin-marin05