Skip to content

Latest commit

 

History

History
81 lines (47 loc) · 1.83 KB

daily-bugle.markdown

File metadata and controls

81 lines (47 loc) · 1.83 KB

Daily Bugle

Daily Bugle

LEGO (n.d.). LEGO Daily Bugle. Retrieved February 12, 2024, from https://www.lego.com/en-ca/product/daily-bugle-76178

Description

The Daily Bugle's antenna, crowned with a pulsating red light, elegantly illuminates when a passing vehicle triggers its sensor.

Daily Bugle

LEGO (n.d.). LEGO Daily Bugle. Retrieved February 12, 2024, from https://www.lego.com/en-ca/product/daily-bugle-76178

Sensors

The output will be a Color & Distance sensor which will be detecting motion in front of the building’s street.

Sensor

Ports

Daily Bugle will require one output port on an EV3 hub to connect a sensor. Sensor will be sending signal to the tower light through a wire.

Sensor

Variables/Settings

Status: When a vehicle passes in front of the tower, status switches to on. When on, the red light on the tower will blink at interval of 3 seconds. Status returns to off after that.

Interval can be changed

Variables

IOT Loop

In this example, the location is only available when recently requested:

While True

    IF status == "on" THEN

        LocationStatus = TRUE
        RotateMotor to 0

        IF counter % 3 == 0 THEN

        Turn off the light

        ELSE

        Turn on the light

        ENDIF
    ENDIF

ENDREPEAT

lighthouse

➔ Back to Hackathon