Page 5 - E-Modul Coding For Kids Berbasis Raspberry Pi
P. 5
Tujuan Pembelajaran .......................................................................................................... 104
A. Membuat pengontrol permainan ................................................................................ 106
B. Menghubungkan Ke Raspberry pi ............................................................................. 109
C. Mengkode Permainan ................................................................................................ 113
D. Daftar Kode Lengkap ................................................................................................. 120
E. Versi Papan Ketik ...................................................................................................... 121
F. Apa Berikutnya? ........................................................................................................ 123
Rangkuman......................................................................................................................... 124
Kuis .................................................................................................................................... 124
MATERI 8. MEMBUAT PETA INTERAKTIF KOTAMU ................................................. 125
Tujuan Pembelajaran .......................................................................................................... 126
A. Halo Dunia! ................................................................................................................ 127
B. Mendapatkan peta ...................................................................................................... 130
C. Menambahkan Penanda ............................................................................................. 137
D. Menambahkan Label .................................................................................................. 139
E. Daftar Kode ................................................................................................................ 144
F. Ekstensi ...................................................................................................................... 146
Rangkuman......................................................................................................................... 153
Kuis .................................................................................................................................... 153
MATERI 9. PENGENALAN GPIO (GENERAL PURPOSE INPUT/OUTPUT) ............... 154
Tujuan Pembelajaran .......................................................................................................... 155
A. GPIO pada Raspberry pi ............................................................................................ 156
B. Menjelajahi pin GPIO ................................................................................................ 156
C. Menyambungkan perangkat keras eksternal ke Raspberry pi (contoh: LED, sensor
suhu) ................................................................................................................................... 158
D. Menggunakan pustaka RPi.GPIO untuk mengendalikan pin GPIO .......................... 159
E. Contoh program untuk mengontrol LED (menyala/mati, membuat pola lampu, dll.)
………………………………………………………………………………………159
Vidio Pembelajaran ............................................................................................................ 163
Rangkuman......................................................................................................................... 164
Kuis .................................................................................................................................... 164
MATERI 10. SENSOR LAMPU OTOMATIS .................................................................... 165
Tujuan Pembelajaran .......................................................................................................... 166
A. Perancangan Sistem ................................................................................................... 167
B. Merancang Hardware ................................................................................................. 168
iv