Skip to content

Instantly share code, notes, and snippets.

@azaharafernandezguizan
Created November 21, 2020 14:47
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 azaharafernandezguizan/87414970c72a25d76838796e4830cad3 to your computer and use it in GitHub Desktop.
Save azaharafernandezguizan/87414970c72a25d76838796e4830cad3 to your computer and use it in GitHub Desktop.
#include <LiquidCrystal.h>
#include <Wire.h>
const int rs = 8, en = 11, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int InitialPositionMoveDisplay = 16;
int PositionsToMoveDisplay = 0;
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
showData();
delay(aplicationDelay);
}
void showData()
{
String dataToShow = resultAirSensorPPM + " " + resultPhotoSensor + " " + resultHearAndOxigenSensor;
lcd.clear();
writeDataInLcd(0, 0, "PPM LIGHT SPO2");
writeDataInLcd(0, 1, dataToShow);
}
void writeDataInLcd(int columnPosition, int rowPosition, String textToWrite)
{
lcd.setCursor(columnPosition, rowPosition);
lcd.print(textToWrite);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment