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

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

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