Skip to content

Latest commit

 

History

History
64 lines (36 loc) · 1.67 KB

File metadata and controls

64 lines (36 loc) · 1.67 KB

Jazz Quartet

Jazz Quartet

LEGO (n.d.). LEGO Jazz Quartet. Retrieved 12 February, 2024, from https://www.lego.com/en-ca/product/jazz-quartet-21334

Description

The Jazz Quartet LEGO® will play whenever there are people in front of them in a certain distance.

Jazz Quartet

LEGO (n.d.). LEGO Jazz Quartet. Retrieved 12 February, 2024, from https://www.lego.com/en-ca/product/jazz-quartet-21334

Ports

Jazz Quartet will use an output port on an EV3 hub to connect ultrasonic sensor.

Sensors and Motors

Ultrasonic Sensor will be used to detect object distance.

Variable and Settings

Status: Can be set to "on" or "off". When on the quartet will move/play whenever there are objects that are 15" or closer.

Jazz Quartet

Pseudocode

In this example, the Jazz quartet will only play when there are any objects at 15" or closer:

While distance<=15

    IF status == "off"

        status = "on"
        Start Playing the jazz

    ELSEIF status == "on"

        status = "on"
        keep playing

    ELSE

        status = "off"
        stop playing

    ENDIF

➔ Back to Hackathon