#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
int pot, Freq;
void setup() {
// put your setup code here, to run once:
lcd.begin(20,4);
pinMode(8, OUTPUT);
pinMode(A5, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
pot=analogRead(A5);
Freq=pot*2;
lcd.setCursor(0,0);
lcd.print("Belajar");
lcd.setCursor(4,3);
lcd.print("SMKN 2 SURAKARTA");
lcd.setCursor(4,1);
lcd.print("POT=");
lcd.print(pot);
lcd.setCursor(4,2);
lcd.print("Freq=");
lcd.print(Freq);
tone(8,Freq,200);
}