arduino - Bluetooth Chat and Android - Bad data received -


i have problem receiving data arduino using bluetooth sample app.

my basic arduino code sends data @ regular intervals. have tried various baud rates.

void setup() {   serial.begin(57600); }  void loop() {   serial.print( 1234 );   delay(1000); } 

the data received in bluetooth chat app gets split 2 parts , first part wrong. data following (my bluetooth device named hc05):

hc05: 1 hc05: 234 hc05: 12 hc05: 34 hc05: 1234 hc05: 2 hc05: 234 hc05: 34 hc05: 34 

how can fix this? ideas?

use println() instead of print() on arduino side. can end of line character on android side make sure whole line.

here link similar question example code: error receiving xml strings via bluetooth in android


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -