m (Example Uses: - fixed the hat block in the second example)
m (Example Uses: - oops, I used < changed to <)
Line 31: Line 31:
 
* Setting an alarm
 
* Setting an alarm
 
<scratchblocks>
 
<scratchblocks>
when distance &lt; (30)::ev3 hat
+
when distance < (30)::ev3 hat
 
repeat (50)
 
repeat (50)
 
beep note (88) for (1) secs::ev3
 
beep note (88) for (1) secs::ev3

Revision as of 01:43, 18 February 2020

Beep Note () For () Secs
beep note () for () secs::ev3
Category EV3
Type Stack
Introduced in 3.0

The beep note () for () secs block is a Stack Block in the LEGO Mindstorms EV3 Extension that beeps the specified MIDI note on the EV3 for the specified number of seconds. It was added in Scratch 3.0 with the rest of the EV3 blocks.

Example Uses

The block beeps a note, so it can be used for many things:

  • Playing music
When gf clicked
beep note (60) for (0.5) secs::ev3
beep note (60) for (0.5) secs::ev3
beep note (67) for (0.5) secs::ev3
beep note (67) for (0.5) secs::ev3
beep note (69) for (0.5) secs::ev3
beep note (69) for (0.5) secs::ev3
beep note (67) for (1) secs::ev3
beep note (65) for (0.5) secs::ev3
beep note (65) for (0.5) secs::ev3
beep note (64) for (0.5) secs::ev3
beep note (64) for (0.5) secs::ev3
beep note (62) for (0.5) secs::ev3
beep note (62) for (0.5) secs::ev3
beep note (60) for (1) secs::ev3
  • Setting an alarm
when distance < (30)::ev3 hat
repeat (50)
beep note (88) for (1) secs::ev3
wait (0.5) secs