Main Content

beep

Play beep from speaker on EV3 brick

Add-On Required: This feature requires the MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware add-on.

Description

beep(myev3) plays a beep for one-tenth of a second at 500 Hz from the speaker that is located on the EV3 brick.

example

beep(myev3,duration) plays a beep for a specific duration.

example

Examples

collapse all

Play a beep from the EV3 speaker for a short period, and then for a longer period.

Create a connection to the EV3 brick called myev3.

myev3 = legoev3;

Play a beep for the default duration of 0.1 second.

beep(myev3)

Play a beep for 1 second.

beep(myev3,1)

Input Arguments

collapse all

Connection to EV3 brick, specified as a string that represents the object created using legoev3.

Example: myev3

Data Types: char

The duration of the beep in seconds, specified as a double.

Example: 1

Data Types: double