Laporan Akhir Percobaan 1 Modul 2





1. Hardware [Kembali]


 



2. Rangkaian Simulasi [kembali]


3. Flowchart [kembali] 


4. Listing Program  [kembali]
#include <LiquidCrystal.h>

#define echoPin 21

#define trigPin 20

long ping;

LiquidCrystal lcd(12, 11, 7, 6, 5, 4);

void setup() {

  // put your setup code here, to run once:


  pinMode(trigPin, OUTPUT);

  pinMode(echoPin, INPUT);


  lcd.begin(16,2);

  lcd.setCursor(0,0);

  lcd.print("PRAKTIKUM");

  delay(50);

  lcd.clear();

  lcd.print("MIKROPROSESSOR");

  delay(50);

  lcd.clear();

}


void loop() {


  digitalWrite(trigPin, LOW);

  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);

  delayMicroseconds(10);

  digitalWrite(trigPin, LOW);

  ping = pulseIn(echoPin, HIGH);


  lcd.setCursor(0,0);

  lcd.print("Ping = ");

  lcd.setCursor(7,0);

  lcd.print(ping);

  delay(100);

  lcd.clear(); 

}

5. Video  [kembali]

6. Kondisi  [kembali]
Menampilkan output sensor ultrasonik ke LCD
7. Link Download  [kembali]
Download rangkaian proteus Disini
Download video percobaan Disini
Download program Disini

Komentar

Postingan populer dari blog ini

PRAKTIKUM ELEKTRONIKA & SISTEM DIGITAL

KULIAH MIKROPROSESOR DAN MIKROKONTROLER 2018