Light and Dark Scavenger Hunt

This challenge provides a basic introduction to datalogging with EV3.

Datalogging enables you to collect data from one or more sensors connected to the EV3 brick over a period of time. It is possible to log data directly from the EV3 brick, but the focus here is on using the EV3 Software to set up and run a datalogging experiment.

EV3 brick and colour sensor
EV3 brick and colour sensor

The challenge

Collect a wide range of light readings from your environment and display them on your computer screen.

Equipment

You need:

  • a colour sensor
  • an EV3 brick
  • the EV3 Software

Create your experiment

  1. Connect the colour sensor to the EV3 brick and remove any additional sensors or motors.
    • Note: The software automatically detects any sensors (including motors) that are connected to the EV3 brick. Remove additional sensors before you start to keep things simpler.
  2. In the EV3 Software, create a new experiment (e.g. File > New Project > Experiment). will appear at the bottom of the screen.
    The Experiment Configuration settings
  3. Check that the Colour Sensor is selected, and change the mode to “Ambient Light Intensity”.
    • Note: You can also adjust the Duration, Rate, Sensor Port, or Colour of the graph if you like.

Run your experiment

There are two ways to run your experiment:

  1. Tethered – With the EV3 still connected to your computer, you can run the experiment and view the results as they are being collected.
  2. Untethered – Download the experiment, and then unplug the USB cable from the EV3 brick, collect your results, and then upload the results to view them.

Your results might look something like this…

Tip and tricks

  • Disconnect any sensors that you don’t need (including motors) before creating a new experiment.
  • When running your experiment untethered, you can tell when data collection has finished by taking note of the EV3 brick’s status light. It flashes green when the experiment is running and stops when it has finished.
  • If you’re collecting data for an extended period of time…
    • remember that you can have the battery pack plugged in and charging while the EV3 brick is running
    • on the EV3 brick > Tools tab, set the Sleep option to “never” so that the EV3 brick doesn’t automatically power down while you’re datalogging.
  • Some toolbar icons to know about…

  • Select the Dataset Table to view, delete, or adjust display options of a dataset…

The following two tabs change content below.

Rob Torok

I'm a teacher in Tasmania, Australia, and have been using LEGO MINDSTORMS with my students since 2001. I'm the editor in chief for LEGO Engineering (this site) as well as the content editor for LEGO Education Australia (LEGOeducation.com.au).

Latest posts by Rob Torok (see all)