Color Sensor in Custom FRC Dashboard

Hello fellow coders, I have been assigned by my builders to add a color sensor control to the FRC Dashboard. I completed all the steps to create a custom FRC Dashboard, and after I deployed the code, the color sensor controls would not change or do anything.

I am currently trying to fix the issue, thought I would post the matter on Chief Delphi while I was trying to fix it.

The Values to/from the Dashboard arrive using Network Tables… Is that the code you run in the robot? If it is, I am not surprised it does nothing in the Dashboard. Consider instead using the NT Tables Write and Read to communicate to and from the Dashboard.

You can see a tutorial here: FRC Dashboard Tutorial

Thanks, will try this

The thing is , I am using third-party VIs for the color sensor. Honestly, I have no clue how to use the NT Read and Write VIs for this. Is there any way to connect a VI terminal to a NT Read VI?

If you’re using more complex data types, such as the clusters, you can use Variants through Network Tables, and then cast them back to the expected data type.

Yes, the third party library is made to run in the robot, so leave it there. In the dashboard I would expect to just see NT Table Reads to show the values that you are acquiring. See the second last image of the tutorial I linked in my previous post.

Read the color sensor on the robot - like in periodic tasks.vi or teleop.vi, and publish it using the SmartDashbooard NT write VI’ s - then you can read it and display it on the dashboard.

Here’s a doc with an example of doing this with a gyro: https://www.frclabviewtutorials.com/tutorials/sensors/dashboard/gyro/

Thanks, will try this today

Finally managed to get the color sensor controls to change in the Dashboard, thanks for everyone’s help!

Dashboard NT Read Write|303x320, 75%

1 Like

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