How to fix Error 516: Unable to Write: Broken Pipe

Consider the possibility that the slider position changed event happens too fast and too frequently for BlueTooth to keep up.

You can slow down the impact on the BlueTooth component by adding 2 global variables, slider_old and slider_new, both init 0, and a Slider_Clock with Timer event every second.

When slide changed
  set global slider_new to slider.Button position

When Slider_clock.Timer
  if global slider_new not equal slider_old then
     set slider_old to slider_new
     go do your BlueTooth thing.
   end if