Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino data not showing on Android App #21

Open
cosminciorba opened this issue Mar 1, 2021 · 3 comments
Open

Arduino data not showing on Android App #21

cosminciorba opened this issue Mar 1, 2021 · 3 comments

Comments

@cosminciorba
Copy link

Hi, it works sending data to the Arduino but when i want to show the data from the Arduino on a (textView for example) just doesn't show anything. I would appreciate your help :)

@omaraflak
Copy link
Owner

You need to add a \n to the end of the message when sending it from the Arduino.

@cosminciorba
Copy link
Author

java1
java2
This is my Arduino and Java code for sending /reciving, still not showing anything, maybe i'm doing something wrong

@omaraflak
Copy link
Owner

First, on Arduino use Serial.println instead of Serial.print. Also you should read a whole line before sending it. Right now you send every character separately, and when you receive the character on Android you overwrite the TextView content with it. Log the results on Android to make sure you are receiving the characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants