Skip to content

Instantly share code, notes, and snippets.

@komponenrobot
Created May 12, 2020 09:53
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/4685ec24fd20d540460f30927d27e7e4 to your computer and use it in GitHub Desktop.
Save komponenrobot/4685ec24fd20d540460f30927d27e7e4 to your computer and use it in GitHub Desktop.
prot_ADC
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,16,2);
int dataAdc;
void setup()
{
lcd.init();
lcd.setCursor(0,0);
lcd.print("RobotikID");
}
void loop()
{
dataAdc = analogRead(A0);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Nilai Adc= ");
lcd.setCursor(12,0);
lcd.print(dataAdc);
delay(200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment