LEGO (n.d.). LEGO Jazz Quartet. Retrieved 12 February, 2024, from https://www.lego.com/en-ca/product/jazz-quartet-21334
The Jazz Quartet LEGO® will play whenever there are people in front of them in a certain distance.
LEGO (n.d.). LEGO Jazz Quartet. Retrieved 12 February, 2024, from https://www.lego.com/en-ca/product/jazz-quartet-21334
Jazz Quartet will use an output port on an EV3 hub to connect ultrasonic sensor.
Ultrasonic Sensor will be used to detect object distance.
Status: Can be set to "on" or "off". When on the quartet will move/play whenever there are objects that are 15" or closer.
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




