Velleman VMM502 Manual Del Usuario página 11

Tabla de contenido

Publicidad

Idiomas disponibles
  • ES

Idiomas disponibles

  • ESPAÑOL, página 63
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

Publicidad

Tabla de contenido
loading

Tabla de contenido