Error 516 Broken pipe

I'm trying to control my project:an electronic mosquito.i used an Arduino uno, Bluetooth module,and a sounder.this project is to generate ultrasonic frequency to repel mosquitoes.i made an mit app to turn on,turn off ,increase and decrease the frequency but I keep getting a broken pipe error


Screenshot 2024-08-08 154414


these are the codes and Proteus connection

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

App.aia (6.3 KB)

Before I get a chance to open the aia, here are two suggestions

The char data type only holds a single letter, if I recall right. So it could never match 'ON' or 'OFF', which have multiple characters. Either use single character commands like 'N' and 'F' or learn to use the string data type and to read until \n delimiter

Get a Bluetooth terminal program from the Play store and use that to test the board code independently from AI2

P.S. I refer you to others with specific hardware experience for your wiring

can you explain what the Bluetooth terminal will do or how I am to use it..if possible a video .. I'm new to the tech thing

Here is specific code to handle the 516 error:

From your .aia export, I see in your blocks:


that you are sending double quotes along with your commands, but you don't expect them on the receiving end.

These blocks would avoid that, and also enable you to expect just single character codes to match your COMMAND variable's char data type:




Regarding how to get and use a Bluetooth terminal app, here's a search in the Play Store:

1 Like

thank you very much.. I'll try this out and see how it goes..also I'm not clear on the codes you sent to avoid the 516 error,do you mean I should include that in my codes.please throw more light .thank you

The kio4 error handling code just masks the 516 error.

It does not prevent disconnection.

Keep it for usability but investigate the disconnect further.