Can Arduino Uno both received and transmit data via bluetooth?

Pardon my English.

My project requires for me to both receive and transmit data using Bluetooth (HC-06). While I have no trouble in transmitting data from my laptop onto arduino via serial monitor and bluetooth, I have problems when trying to transmit data from Android handphone onto arduino which will then transmits towards the laptop and display at serial monitor.

The current code that I am using declares two serials in the beginning

 Serial.begin (9600);
 Serial1.begin (9600);
 pinMode(13, OUTPUT);

This work for Intel Galileo. Reading further on the topic, I found that method is unusable for Uno since it only has 1 RX and TX pin. Can anybody help or confirm this? If so, any suggestion would be greatly appreciated. Thanks.

I found that method is unusable for Uno since it only has 1 RX and TX pin. Can anybody help or confirm this?

Yes that is correct, although a Mega has three serial ports.

Most people use the software serial libiary to talk to a HC-06.

Sorry what is meant by software library?

The SoftwareSerial library comes with the Arduino IDE.

Can further elaborate with examples please?

There is an example included in the Softwareseral library. It is OK to run software serial at 9600 rather than 4800.

Thank you for the suggestion. Will further look into it and try to figure it out.

Just to paraphase,by applying the Softwareserial library I will be able to talk to HC-06?

A search on Google for "software serial hc-06" will get lots of information on using the HC06 with software serial.

Izzy13:
Just to paraphase,by applying the Softwareserial library I will be able to talk to HC-06?

Yes. You use the USB cable on Serial for the Serial monitor, and the stated pins in the example for Bluetooth. This is a pretty dumb exercise, where Arduino is essentially just a redundant middleman, but it does prove the point by enabling you to send data from serial monitor to phone.

Don't forget to connect Tx>Rx and Rx>Tx

Thanks for all the suggestions! Per your advice, I tried softwareserial library as given by the Arduino webpage Software Serial

And sure enough, I can transmit data from serial monitor to arduino. However I have some confusion. I assuming it is via bluetooth? However, the HC-06 is connected to my android handphone. How does that work?

Also, looking back, I think I got my topic wrong. 'Is there anyway to transmit data from android handphone to HC-06 via bluetooth' would have been a more accurate title. I downloaded two different applications (Blueterm and SerialBluetoothTerminal) and both can be connected to the HC-06. Yet, it still cannot send data/command to Arduino Uno. Can anybody help?

Please bear with me

Izzy13:
And sure enough, I can transmit data from serial monitor to arduino. However I have some confusion. I assuming it is via bluetooth?

No, it isn't, and never will be. Bluetooth is for connecting Arduino to Android.

However, the HC-06 is connected to my android handphone. How does that work?

By doing what it is supposed to do.

Also, looking back, I think I got my topic wrong. 'Is there anyway to transmit data from android handphone to HC-06 via bluetooth' would have been a more accurate title.

That doesn't matter. If it works one way it will work the other, and any terminal will do. If you want to use software serial, the example in the software serial library should suffice. Read replies #5,#8 again.

You might be interested in
https://forum.arduino.cc/index.php?topic=600820.0