LAMPIRAN
LAMPIRAN PROGRAM
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 10, 9,8,7,6);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("NAMA:DARA ZALINA");
lcd.setCursor(0, 1);
lcd.print("NIM :132411038");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("A. UKUR KADAR CO");
delay(1000);
lcd.clear();
}
void loop() {
int sensor=analogRead(A0);
float hasil = sensor/3.4;
lcd.setCursor(0, 0);
lcd.print(hasil);
lcd.setCursor(6, 0);
lcd.print("PPM");
if (hasil < 50)
{
lcd.setCursor(0, 1);
lcd.print("BAIK !!! ");
delay(100);
}