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

I'm working on a robotic arm project. But I want to try to connect one of the servo on the robotic arm via bluetooth HC-05. I found the method at

I've made an application at MIT according to the web. However, when I connect bluetooth via MIT App Inventor 2 on my android, I always get the message "Error 516: Unable to Write: Broken pipe". How to fix it? Please help me :frowning_face:

Is there something wrong with the blocks?

fyi. I have tried from several sources that say that the error can be fixed by connect, disconnect, and then reconnect the bluetooth in the application. But, it doesn't work for me :frowning_face:

yes... the clock compnent does not make sense, see also

are you able to connect after starting the app?
which device and Android version are you using for your tests?


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hi, thanks for replying me.
Yes, I'm able to connect bluetooth with the MIT AI2 Companion application on my android after starting the app. But it kept saying "Error 516: Unable to write: Broken pipe".

My android type is Android 10. Is android type affect the error?

I've tried the block. But, I still don't get it. Is there something wrong with my block?

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