🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Color Sensor UiFlow or micropython code

    PRODUCTS
    2
    3
    8.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      devros
      last edited by

      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

      lukasmaximusL 1 Reply Last reply Reply Quote 0
      • lukasmaximusL
        lukasmaximus @devros
        last edited by

        @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

        1 Reply Last reply Reply Quote 0
        • D
          devros
          last edited by

          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))

          1 Reply Last reply Reply Quote 0
          • First post
            Last post