Send numbers via Bluetooth

I am trying to send numbers representing equalizer bands from my phone(Samsung A52) through Bluetooth to an ATmega64 microcontroller. I have created buttons for each band, so when the "63Hz" button is pressed, I want to send the number 1 to the microcontroller, for "160Hz" 2, and so on up to OUT-9.

I initially tried using the "callBluetoothclient1 send text" block, but it seems that the microcontroller is not receiving anything. Now, I have tried using "send1bytenumber", but it is not working. Do yo u have any ideas?


licenta (2).aia (202.0 KB)

I have realized that I need to send a carriage return (CR) character in order for the microcontroller to receive the data correctly, but I don't know how to do.

CR is \r, so to send '8' send '8\r'.

NumbersOnly is a true/false value, so this is wrong:

Sending a OneByteNumber is totally different from sending one bye's worth of text.
Which is appropriate?
It depends on the data type (int? char? ) you use to receive the data in your microcontroller code, which you did not post.

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