Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 2.13 KB

police-crime-truck.markdown

File metadata and controls

70 lines (45 loc) · 2.13 KB

Police Crime Truck

Police Crime Truck

The LEGO Group. (n.d.). Police Mobile Crime Lab Truck™. Retrieved 2024, from https://www.lego.com/en-ca/product/police-mobile-crime-lab-truck-60418

Description

Whenever a crime is committed in the city and alerted, the Police Crime Truck will receive the location and navigate there.

The LEGO Group. (n.d.). Police Mobile Crime Lab Truck™. Retrieved 2024, from https://www.lego.com/en-ca/product/police-mobile-crime-lab-truck-60418

Sensors and Motors

The 4 outputs will be attached to an EV3 brain. The truck will need a small motor to move the wheels and a GPS module to interact with the alert location. The truck will need a distance sensor to detect obstructions. Additionally, it will also need LED lights turning ON and OFF as well as audio outputs to simulate a siren.
police mobile crime lab truck large motor police mobile crime lab truck light

Ports

Crime Truck will require two output ports on an EV3 hub to connect a motor and LED lights.

police mobile crime lab truck ports

Variables/Settings

Status: Can be set to "on" or "off". When there is an alert in the city.

Pseudocode

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

While True

    If status == “ON"

        Start motor and Light

        Go to the alert location using the GPS

        Stop motor and light

    else status == “OFF”

        Stop motor and light

➔ Back to Hackathon