Herunterladen Inhalt Inhalt Diese Seite drucken

Velleman VMM502 Bedienungsanleitung Seite 11

Micro:bit tinker kit
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen
  • DE

Verfügbare Sprachen

  • DEUTSCH, seite 82
Step 4
Click on
Tinkercademy
components in your kit.
Next, let's create a conditional statement
the
Logic
section of the Code Drawer.
The code shown below means that, when button A is pressed on the ADKeypad while the ADKeypad is
plugged in at pin 2 (P2) of the BoB, the buzzer will play a sound of 175 Hertz.
Since there are 5 buttons, we need to code 5 similar conditional statements. Each button 'controls' a
sound of a particular pitch and so pressing each button produces sounds of different pitches.
When complete, we compile the programme to generate a .hex file. Click on the download button and
save the .hex file to the
micro:bit.
Plug the micro:bit into the USB port via the micro-USB cable. Then, drag and drop the .hex-file (from
the
Downloads
Now, you can play music by pressing the keys on the ADKeypad. Enjoy!
V. 01 – 17/01/2019
or
OLED
inside the Code Drawer to find our custom blocks for the various
Downloads
folder (C:\downloads). This .hex file is ready to be uploaded to the
folder) onto the micro:bit
VMM502
if then else
as shown in the picture. You will find this block in
Removable device
to upload the programme.
11
©Velleman nv

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis