How can I make an engine work when it detects a color, I already have the color detector programmed that is what I could achieve by reading the documentation but it does not mark how I can run the engine when I detect the information and I have not yet found a way to know if the sensor is working correctly then if there is a way that can show me in the drive station or make the engine work it would be very helpful to control the programming of the teleop where I have the color detector
Using interactive execution, you can also use controls and indicators in front panels to interact with your VIs. I recommend printing out the value received from the sensor to an indicator in the front panel.
You can also send the values to the dashboard using Network Tables. You can find an example here: FRC Dashboard Tutorial
As an example: my team did an experiment where the color sensor would return the color string, and using a case structure we would ask a motor (equipped with an encoder, such as a Falcon 500) to turn to the next color and repeat the sequence until we get the desired color/rotations in the control panel.