Created
May 12, 2020 09:53
-
-
Save komponenrobot/4685ec24fd20d540460f30927d27e7e4 to your computer and use it in GitHub Desktop.
prot_ADC
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 <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