Making a Shuffleboard plugin play sounds

Following up on a previous post about creating a custom Shuffleboard plugin, here’s the process I went through to make one play sounds when a Boolean value goes from false to true. Feel free to play around with it!

Note: So far only tested on Linux; I’d be interested to know if it works for people on Windows as well. On my Linux machine, it only supported .wav files, but it may support other formats on other architectures depending on the capabilities of the underlying APIs.

Could this work in a C++ project?

You mean with C++ robot code? Should work fine; Shuffleboard itself is a Java program (as are its plugins), but it communicates with the robot with Network Tables, which don’t care what programming languages are used.

If you write your robot code in C++ and emit some boolean values onto the Network Table, then Shuffleboard should be able to see them and (using this plugin and the widget in it) respond by playing a sound when the boolean value goes from false to true.

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