1

I am new to Arduino I got 0 knowledge in it and also this is my first time coding with bluetooth, so I wanted to ask how can I actually receive serial data from arduino for example and change the textview in my android:

this

I want to get this value from arduino and change the textview in my android. So it will be something like if (xxx == "11"){ textview.setBackgroundColor(Color.RED);} but I don't know how to write/how to get the arduino value and declare in android.

1

1 Answer 1

1

You'll need a HC-05 bluetooth module for example, and the use of the Serial library. Try to define a new serial port and then send your data by it. Arduino code :

SoftwareSerial btSerial (12, 13); //TX sur 12 et RX sur 13
btSerial.begin(9600);
btSerial.println("Link Started !");
Sign up to request clarification or add additional context in comments.

2 Comments

I'm actually looking for the arduino code I used, wait a sec'.
I did put a link in my first comment under your question, it is written in kotlin and has everything you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.