All paths

Light, color, UV and gesture sensors

The digital light sensors read close to their datasheets on the Uno: lux with the BH1750 and VEML7700, the LTR390’s UV index, color with the TCS34725 and by frequency with the TCS3200, APDS-9960 gestures and AMG8833 heat pixels, then a candy color sorter.

Arduino Uno R3Free7 lessons7 h4 chapters2,448 XPEmbedded engineering · Intermediate+150 XP

0 of 7 done

What you will build

3 projects, built step by step

7 lessons in 4 chapters, about 7 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

UV index with an LTR390

An LTR390 measures visible light and ultraviolet with two photodiodes, one at a time: mode switching, raw counts into a UV index with the datasheet’s sensitivity, the WHO’s exposure bands, and gain against range.

Open it in the simulator
Chapter 2 project

TCS3200: color by frequency

A color sensor with no bus at all: four filter groups chosen with two pins, light turned into a square wave, edges counted on an interrupt for a fixed gate time, calibration against white and black cards, and frequency scaling.

Open it in the simulator
Chapter 3 project

Heat pixels with an AMG8833

An 8x8 thermal camera on I2C: 64 thermopiles that read temperature from a distance, the raw quarter-degree words, a heat map in text, the hottest pixel’s row and column, and a presence lamp that works in the dark.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

How bright

Light in lux and ultraviolet in UV index, and the gain that sets the range.

  1. Open267 XP

    Lux with BH1750 and VEML7700

    Two digital light meters that answer in lux: the BH1750 read with three Wire calls, the VEML7700 with automatic gain, a streetlight with hysteresis, and what saturates in full sun and how a longer or shorter measurement fixes it.

    0 of 7 steps

  2. ProjectLocked534 XP

    UV index with an LTR390

    An LTR390 measures visible light and ultraviolet with two photodiodes, one at a time: mode switching, raw counts into a UV index with the datasheet’s sensitivity, the WHO’s exposure bands, and gain against range.

    0 of 7 steps

5 questions, graded as you go.
Chapter 2

What color

Two color sensors, one with counts on I2C and one with a frequency on a pin.

  1. Locked236 XP

    Color with a TCS34725

    Red, green, blue and clear counts under the sensor’s own white LED: why a color is in the shares and not the counts, naming a color by its hue, what the LED is for, and what too much gain does to a white card.

    0 of 6 steps

  2. ProjectLocked436 XP

    TCS3200: color by frequency

    A color sensor with no bus at all: four filter groups chosen with two pins, light turned into a square wave, edges counted on an interrupt for a fixed gate time, calibration against white and black cards, and frequency scaling.

    0 of 6 steps

4 questions, graded as you go.
Chapter 3

Hands and heat

A sensor that sees which way a hand swipes, and one that sees in heat.

  1. Locked236 XP

    Gestures with an APDS-9960

    One chip that sees light, color, a hand coming close and which way it swipes: proximity from reflected infrared, the gesture engine and its FIFO, the interrupt pin, and a lamp you switch and dim with a wave.

    0 of 6 steps

  2. ProjectLocked472 XP

    Heat pixels with an AMG8833

    An 8x8 thermal camera on I2C: 64 thermopiles that read temperature from a distance, the raw quarter-degree words, a heat map in text, the hottest pixel’s row and column, and a presence lamp that works in the dark.

    0 of 6 steps

4 questions, graded as you go.
Chapter 4

Boss: the sorter

A color sensor, a servo and a tally: a candy-sorting machine.

  1. Locked267 XP

    Boss: a candy color sorter

    Build a candy-sorting machine: a TCS34725 looks at each candy, a nearest-neighbor match against six taught colors picks a bin, a servo swings the chute, an LCD keeps the tally, and anything unknown goes to the reject bin with a beep.

    0 of 7 steps

3 questions, graded as you go.
Syllabus

Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

How bright

  1. Lux with BH1750 and VEML7700Two digital light meters that answer in lux: the BH1750 read with three Wire calls, the VEML7700 with automatic gain, a streetlight with hysteresis, and what saturates in full sun and how a longer or shorter measurement fixes it.
  2. UV index with an LTR390An LTR390 measures visible light and ultraviolet with two photodiodes, one at a time: mode switching, raw counts into a UV index with the datasheet’s sensitivity, the WHO’s exposure bands, and gain against range.
Chapter 2

What color

  1. Color with a TCS34725Red, green, blue and clear counts under the sensor’s own white LED: why a color is in the shares and not the counts, naming a color by its hue, what the LED is for, and what too much gain does to a white card.
  2. TCS3200: color by frequencyA color sensor with no bus at all: four filter groups chosen with two pins, light turned into a square wave, edges counted on an interrupt for a fixed gate time, calibration against white and black cards, and frequency scaling.
Chapter 3

Hands and heat

  1. Gestures with an APDS-9960One chip that sees light, color, a hand coming close and which way it swipes: proximity from reflected infrared, the gesture engine and its FIFO, the interrupt pin, and a lamp you switch and dim with a wave.
  2. Heat pixels with an AMG8833An 8x8 thermal camera on I2C: 64 thermopiles that read temperature from a distance, the raw quarter-degree words, a heat map in text, the hottest pixel’s row and column, and a presence lamp that works in the dark.
Chapter 4

Boss: the sorter

  1. Boss: a candy color sorterBuild a candy-sorting machine: a TCS34725 looks at each candy, a nearest-neighbor match against six taught colors picks a bin, a servo swings the chute, an LCD keeps the tally, and anything unknown goes to the reject bin with a beep.
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About Light, color, UV and gesture sensors

Is Light, color, UV and gesture sensors free?

Yes. All 7 lessons of Light, color, UV and gesture sensors are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Light, color, UV and gesture sensors take?

About 7 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: UV index with an LTR390, TCS3200: color by frequency and Heat pixels with an AMG8833.

Where do I start?

With "Lux with BH1750 and VEML7700", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.