i have a problem with receiving data on my phone via bluetooth HC 05. I'm using arduino uno with proximty sensor. Code is written and it gives a value 0 or 1, depends on output value. It could be also stop or go. I use bluetoothclient ReceiveTextNumberOfBytes function, but there is no errror and no data. Any ideas?
Dear @Stojan_Humar,
there are many things that we need to know before being in degree to help you. @Anke has already asked the relevant blocks, as far as the AI2 is concerned, in addition, also in your Arduino code I have some doubts.
The HC05 is connected to pins 0 and 1 ? Because you use the Serial.println() function that addresses those pins. Have you reversed the pins between HC05 and Uno ? (i.e. Uno Tx pin to HC05 Rx pin and visa versa). Are you sure that the HC05 baudrate is effectively 9600 baud ? Are you aware that your Arduino code is transmitting every 10 millisecond a '1', unless the sensor generates an input on pin 3 ? Do you really need such fast updating rate: once you'll be sure that your Arduino code is working fine, the AI2 app will have to be capable to withstand with such speed!
So, before going deeper with your app, please verify that your Arduino board and code are working as you expect. To this purpose install on your Android device a free app capable to receive everything on the BT line such as "Serial Bluetooth Terminal". You can download it free from google playstore. Once done with that then you are sure that your Arduino is sending the correct data and you can then focus on the app.
PS while I was writing my answer I've seen that also @ChrisWard has given some suggestions
.. Also, make sure your App knows which character is used to indicate the end of the incoming data (annoyingly known as the Delimiter Byte in App Inventor):