Analisis Baris Output pada LCD Arduino

Computer ScienceArduino ProgrammingEasy

Published:

Perhatikan potongan program berikut ini!

```cpp

11 void setup()

12 {

13 lcd.init();

14 lcd.backlight();

15 }

16 void loop()

17 {

18 int i;

19 lcd.setCursor(0,0);

20 lcd.print("HALOO AREK SMASA");

21 lcd.setCursor(0,1);

22 lcd.print("JAYA JAYA JAYA");

23 for (i = 0 ; i < 16; i++)

24 {

25 lcd.scrollDisplayRight();

26 delay(200);

27 }

28 }

```

Program tersebut menghasilkan output **JAYA JAYA JAYA** pada baris pertama

Benarkah jawaban dari pernyataan di atas

Select one:

True

False

This question includes visual content: Sebuah potongan kode program Arduino yang ditampilkan di dalam editor teks dengan nomor baris 11-28. Kode tersebut berisi fungsi setup() yang menginisialisasi lcd dan menyalakan backlight. Di dalam fungsi loop(), terdapat perintah lcd.setCursor(0, 0) diikuti lcd.print("HALOO AREK SMASA") dan lcd.setCursor(0, 1) diikuti lcd.print("JAYA JAYA JAYA"). Terdapat juga sebuah perulangan 'for' dari i=0 sampai i<16 yang memanggil lcd.scrollDisplayRight() dengan delay 200ms.

Animated Video Solution

The first half plays free, the full solution is in the app.

Step by Step Written Solution

1
Step 1

Mari kita perhatikan potongan kode pemrograman Arduino ini untuk menentukan apakah pernyataan yang diberikan benar atau salah.

Analisis Baris Kode LCD

2
Step 2

Pernyataan menyebutkan bahwa teks JAYA JAYA JAYA muncul pada baris pertama. Ayo kita periksa bagian void loop.

Fokus pada void loop()

3
Step 3

Pada baris sembilan belas dan dua puluh, kode mengatur kursor ke posisi nol koma nol dan mencetak teks HALOO AREK SMASA.

$$19: lcd.setCursor(0,0);$$
$$20: lcd.print("HALOO AREK SMASA");$$
4
Step 4

Dalam pemrograman LCD, koordinat nol koma nol merujuk pada kolom nol baris pertama. Jadi, baris pertama menampilkan HALOO AREK SMASA.

The rest of this solution is on Solvi

4 more steps are locked. Watch the full animated, narrated solution for free.

Snap a photo, solve any question like this.

Download on the App Store Get it on Google Play

Free to download · First solutions are on us

100K+Questions solved daily
50K+Students learning
4.8 ★App Store rating

About This Question

Subject
Computer Science
Topic
Arduino Programming
Difficulty
Easy
Question Type
True or False

Solve any question in seconds

Snap a photo and AI explains it step by step with voice and animation.

Download on the App Store Get it on Google Play
Solvi
The full solution is in the appFree to download · First solutions are on us
Get