# Color Matching with the Light Sensor and CircuitPython: Adafruit Circuit Playground Express

**URL:** https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860
**Category:** Guides
**Created:** [6 June 2018 03:54 UTC](https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860 "2018-06-06T03:54:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)
#### Post date: [6 June 2018 03:54 UTC](https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860/1 "2018-06-06T03:54:12Z")

</div>

Stephen just shared a new tutorial: [**"Color Matching with the Light Sensor and CircuitPython: Adafruit Circuit Playground Express"**](http://core-electronics.com.au/tutorials/color-match-light-sensor-circuitpython-adafruit-circuit-playground-express.html)  
  
 ![](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/d/d3ae7111b50a17f8917b473b21676159d872e1c6.png)  
  
The Adafruit Circuit Playground Express comes equipped with an analog light sensor, but it can be used for much more than just sensing light or darkness! The light sensor has a similar spectral response to the human eye. Its connected to analog pin A…  
  
[**Read more**](http://core-electronics.com.au/tutorials/color-match-light-sensor-circuitpython-adafruit-circuit-playground-express.html)

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)
#### Post date: [24 September 2018 06:46 UTC](https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860/2 "2018-09-24T06:46:40Z")

</div>

This code has been updated to be compatible with CircuitPython 3.x

---

<div class="post-metadata">

### Author: ![Thomas83307](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Thomas83307](https://forum.core-electronics.com.au/u/Thomas83307)
#### Post date: [24 March 2019 20:17 UTC](https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860/3 "2019-03-24T20:17:53Z")

</div>

Hi, I tried this code and I couldn’t get it to work. Noticed that the code in the video doesn’t match the code on the webpage. I want to use it in my STEM class.  
  
  
  
Appreciate your efforts, your designs have been very helpful!  
  
Tom

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)
#### Post date: [26 March 2019 02:48 UTC](https://forum.core-electronics.com.au/t/color-matching-with-the-light-sensor-and-circuitpython-adafruit-circuit-playground-express/2860/4 "2019-03-26T02:48:50Z")

</div>

Hi Thomas,

The code was updated when CircuitPython changed to version 3. The video was unchanged, there are just a few syntax changes but the bulk of it is the same.

I just loaded this up on my Circuit Playground Express here and everything works as expected. What errors do you get when you run it with the serial monitor open in Mu?  
Do you have the most recent libraries installed on the Circuit Playground Express?
