You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • It looks like the datasheet for the device is here:

    http://www.dfrobot.com/image/data/SEN010­1/TCS3200%20TCS3210.pdf

    The interface isn't great for Espruino, but it seems like it should be easy enough to make it work:

    • Set OE = 1 (off)
    • Set S0 = 0, S1 = 1 (for the low range frequency out)
    • S2,S3 specify the colour to check
    • setWatch on the output pin, and use the timestamp to work out the frequency
    • digitalPulse(OE,0,1) (lower OE for 1 millisecond - don't do it for long or there will be so many oscillations that Espruino won't be able to process them all)
About

Avatar for Gordon @Gordon started