Micro:bit and external color sensor?

Hello! I am trying to connect an external color sensor (https://www.adafruit.com/product/1356 ) to the micro:bit V2 using makecode. It needs to be an external sensor for my project.

I think I need an extension in makecode? I see this one but I cant get the code working. https://makecode.microbit.org/pkg/joy-it/pxt-SEN-Color

do you think I could use this? How would the code work? I want an etrnal LED to show the color from the sensor!

I am so confused! Thanks so much!

That extension looks like it was written for the TCS3200, but the sensor you linked uses the TCS34725. I’m not sure how compatible those two sensors are.

I don’t know of any existing extensions for that flora sensor, but since it communicates over i2c you might be able to use the i2c blocks:


You can find them under the “more” subcategory that appears when you open the “pins” category.

To figure out the i2c protocol, you can either try the data sheet or potentially take a look at converting the C++ code in adafruit’s arduino library.

1 Like

Cool, will check this out! Thanks so much!

Try this one