Created
November 21, 2020 14:47
-
-
Save azaharafernandezguizan/87414970c72a25d76838796e4830cad3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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