Color Sensor UiFlow or micropython code
-
hello, just purchased Color Sensor module and want to use in micropython (or inflow)
on wiki page wiki can't find code or info ...
Anyone get this working ?thanks
-
@devros Hi there, my apologies that we haven't got around to adding the colour sensor functionality in uiflow yet we only have examples for programming it with [arduino].(https://github.com/m5stack/M5Stack/tree/master/examples/Unit/Color) However there is a micropython library for this sensor which you can find here and some examples and documentation here . If you don't know how to get the library on to your m5stack follow this tutorial
Hope this helps, let us know how you get on.
Luke
-
thanks it works great used this library
and this basic code to test
import tcs34725
import time
from machine import I2C, Pin
i2c = I2C(0, sda=21, scl=22)
sensor = tcs34725.TCS34725(i2c)
print(sensor.read(True))