Hey, I am having trouble with creating an indicator to go the driver station for our encoder. We are using the KOP US Digital encoders given a year or two ago attached to the shaft of our shooter wheel. I am trying to create an indicator on the driver station that will display the rpm’s our shooter is spinning at for our co driver to see when he spools up to shoot. Can someone help me with how I can collect and send the data to the DS for us to see during the match? Thanks
you need to do two things
First: in the Dashboard Data Vi, obtain the data from the encoders, be it from a global variable or what. Bundle the data (you can add more in later) and use the “flatten to string” command (I can’t remember where it is, but it turns a bundle into binary) connect the string to the vi “send user data high”, which sends it to the dashboard. After that, right click the bundle you flattened and select create constant. Copy the constant and save it for later
Second: you need to make a custom dashboard, which can be done in the project viewer. In the block diagram there is a disabled box that has an item (unflatten from string) in it (I am doing this from memory) what you need to do is create a constant for one of the terminals on the left, use the one you copied in the first part. Connect it to the terminal and the output should be the same bundle you inputted in part one. Unbundle the bundle and use the wires to connect to a gauge or whatever it is that you choose. To save the Dashboard, go to the dashboard project screen and build it to a location. Name it Dashboard.exe and replace the original dashboard, and all the files in it in C:\Program Files\FRC Dashboard.
P.S. you can also add crosshairs in the custom dashboard by adding lines, under decoration.
P.P.S Be careful with connecting those encoders to the shooter wheel. Many, many people fried their encoders from them not being able to handle throwing wheel speeds.
Can I just follow the tutorial given here:
only instead of a gyro, I replace with an encoder?
Also since the encoder “Get VI.” outputs the distance in inches, how can get the encoder to output rpm