# I need to find a way to read a frequency of (on/off) on GPIO, Im trying to use TCS3200 colour sensor

**URL:** <https://discourse.nodered.org/t/i-need-to-find-a-way-to-read-a-frequency-of-on-off-on-gpio-im-trying-to-use-tcs3200-colour-sensor/55032>\
**Category:** General\
**Created:** [11 December 2021 07:59 UTC](https://discourse.nodered.org/t/i-need-to-find-a-way-to-read-a-frequency-of-on-off-on-gpio-im-trying-to-use-tcs3200-colour-sensor/55032 "2021-12-11T07:59:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![XhanceHd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xhancehd/32/48135_2.png) [@XhanceHd](https://discourse.nodered.org/u/XhanceHd)\
**Post date:** [11 December 2021 07:59 UTC](https://discourse.nodered.org/t/i-need-to-find-a-way-to-read-a-frequency-of-on-off-on-gpio-im-trying-to-use-tcs3200-colour-sensor/55032/1 "2021-12-11T07:59:30Z")

</div>

I'm trying to run **TCS3200** color sensor on raspberry pi 4 and node red.  
the color sensors outputs a frequency based on the light intensity

I've tried running the normal GPIO In and removed the debounce, with a function to only pass through new output, and an interval length node,  
but the GPIO IN without a debounce just overloads the node red.

is there a way for me to just read GPIO IN(using interrupt preferably) on a function node to get the time of rising/falling edge?  
maybe there is a node that can read the frequency/period of GPIO in,  
or maybe there is a node that is used for this type of color sensor

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 December 2021 09:18 UTC](https://discourse.nodered.org/t/i-need-to-find-a-way-to-read-a-frequency-of-on-off-on-gpio-im-trying-to-use-tcs3200-colour-sensor/55032/2 "2021-12-11T09:18:50Z")

</div>

Tbh, this is not really going to work well. This sensor is best suited to a micro controller (Arduino/esp).

Personally, I would hook this up to an esp and transmit the RGB values to node-red via serial or MQTT

There is good info here: [Arduino Color Sensor TCS230 TCS3200 | Random Nerd Tutorials](https://randomnerdtutorials.com/arduino-color-sensor-tcs230-tcs3200/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 February 2022 09:19 UTC](https://discourse.nodered.org/t/i-need-to-find-a-way-to-read-a-frequency-of-on-off-on-gpio-im-trying-to-use-tcs3200-colour-sensor/55032/3 "2022-02-09T09:19:08Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
