Fabian
Hey, is there a way to read the frequency of a certain pin to make it work with the TCS3200 or is there a known work around on how to work with color sensors using OpenPlc?
Reply 0 0
thiagoralves
Your best bet is to use an Arduino Extension and write some Arduino code to read the sensor. There are several tutorials online on how to do that, Google just happened to suggest me this one: https://randomnerdtutorials.com/arduino-color-sensor-tcs230-tcs3200/
 
Just beware of the delays() in your code. Any delay() on an Arduino Extension makes the runtime stall. Instead of delays, create a state machine so that you read each color on a separate scan cycle - the sketch_loop() function is called once per scan cycle.
Reply 0 0
Reply