Problems related with bluetooth

Hello, iam having some issues with pin 1(RX) looks like something is wrong with that pin, How i knew? I tried to upload a program to my arduino but i'm getting this error "An error occurred while uploading the sketch". Anyways, i'm here to ask you if i can replace this pin i mean can i use another pin instead of RX>1 ? second pin (TX) is working fine so i dont' need to replace it.
So is there any way to change that pin and what's its code please what should i add in my code to make define it, Thanks in advance.

(deleted)

There are some undocumented conventions which are usually followed by microcontroller students. These are:

Pin-1 refers to the physical pin of the microcontroller.
DPin-1 refers to the 'Digital Pin 1 on the UNO Connector.'

pin 1(RX) -- actually it is DPin-1(TX). This connector pin takes signal from the Transmitter Section (hence TX) of the hardware UART Port of the MCU and transmits to an external device. The DPin-0 and DPin-1 are attached with the Serial Monitor via USB Port of the UNO/PC. Therefore, these two pins are not usually used for some other purposes. In case the need arises to use them as digital IO lines, the user removes wires/jumpers from these two pins before uploading the sketch. After uploading, the wires are put back.

If you want to operate Bluetooth device using this UART port which is occupied by the Serial Monitor, you will face some difficulties which can only be solved by an advanced learner. The novice users engage a software UART Port for the BT and other UART driven devices.

spycatcher2k:
I fail to see how bluetooth is a problem!
I fail to see any error messages!
I fail to see your logic behind 'pin 1 ' failure.

You can't change the hardware pin!

Okay let me explain more, When i connect bluetooth with Arduino, RX to TX and TX to RX and then i upload the code to arduino nothing happens i mean it keeps loading then i get an error message so i knew there's something wrong with one of my pins.

  1. I disconnected the second pin and tried to upload the code, got the same error.

  2. I disconnected the first ping (RX) and connected back TX to the second pin and uploaded the code, i got no error, it works fine it says that program has been uploaded. But it didn't fully uploaded because RX was disconnected so..

So my guess is, there's something wrong with my first pin (RX) is there anyway i can connected the TX of my bluetooth module to another pin in arduino ? for example TX > Pin 13 and if so, how can i define it in my program?

GolamMostafa:
There are some undocumented conventions which are usually followed by microcontroller students. These are:

Pin-1 refers to the physical pin of the microcontroller.
DPin-1 refers to the 'Digital Pin 1 on the UNO Connector.'

pin 1(RX) -- actually it is DPin-1(TX). This connector pin takes signal from the Transmitter Section (hence TX) of the hardware UART Port of the MCU and transmits to an external device. The DPin-0 and DPin-1 are attached with the Serial Monitor via USB Port of the UNO/PC. Therefore, these two pins are not usually used for some other purposes. In case the need arises to use them as digital IO lines, the user removes wires/jumpers from these two pins before uploading the sketch. After uploading, the wires are put back.

If you want to operate Bluetooth device using this UART port which is occupied by the Serial Monitor, you will face some difficulties which can only be solved by an advanced learner. The novice users engage a software UART Port for the BT and other UART driven devices.

GolamMostafa:
There are some undocumented conventions which are usually followed by microcontroller students. These are:

Pin-1 refers to the physical pin of the microcontroller.
DPin-1 refers to the 'Digital Pin 1 on the UNO Connector.'

pin 1(RX) -- actually it is DPin-1(TX). This connector pin takes signal from the Transmitter Section (hence TX) of the hardware UART Port of the MCU and transmits to an external device. The DPin-0 and DPin-1 are attached with the Serial Monitor via USB Port of the UNO/PC. Therefore, these two pins are not usually used for some other purposes. In case the need arises to use them as digital IO lines, the user removes wires/jumpers from these two pins before uploading the sketch. After uploading, the wires are put back.

If you want to operate Bluetooth device using this UART port which is occupied by the Serial Monitor, you will face some difficulties which can only be solved by an advanced learner. The novice users engage a software UART Port for the BT and other UART driven devices.

I don't really get it mate, i'm kinda new so :v Could it be a problem with my arduino card? And if there's a way to change the first pin (1), i would like to know it because i'm in a hurry and i've to make this thing work, thanks in advance.

(deleted)

(deleted)

spycatcher2k:
So what? That's a YOU problem, nothing to do with us or the forum!

Why are you being kinda rude mate? ik it's my problem and i didn't say that it has something to do with you so, let's keep it calm please.

When there is only a single hardware serial connection you can use it for the bluetooth communications, but as spycatcher2 and golammostafa say,you must disconnect the bluetooth RX/TX when downloading code through USB. Reconnect the bluetooth after the download is complete.You will not be able to use the Serial Monitor when the program with bluetooth on the hardware serial is running.

(deleted)

cattledog:
When there is only a single hardware serial connection you can use it for the bluetooth communications, but as spycatcher2 and golammostafa say,you must disconnect the bluetooth RX/TX when downloading code through USB. Reconnect the bluetooth after the download is complete.You will not be able to use the Serial Monitor when the program with bluetooth on the hardware serial is running.

Thank you, i noticed this after posting and thank you for making it more clear to me.
At least, a clear answer, and someone who understands people.

spycatcher2k:
I am calm! :slight_smile: Just letting you know that this has no bearing on responses, except when it's used to demand a response, for example : i would like to know it because i'm in a hurry and i've to make this thing work

I understand you would like to know (You asked :slight_smile: )
because i'm in a hurry - not relevant, but Why? Bad planning, Boss chasing you for the work to be done, University project due shortly?

I've to make this thing work - Yip, I don't build things not to work, so not relevant.

Be more diplomatic in your responses! Post a FULL description of what you are trying to achieve, post your code, NEVER make an assumption! or guess! Make informed choises with the information supplied to you.

A quick google of Arduino bluetooth example, would of given you working examples to read through, and understand the basics needed to complete your project (This part at least).

And I'm NOT your mate, I'm my husbands mate!

Alright, good to know, Thank you for everything anyways.

(deleted)

GolamMostafa:
If you want to operate Bluetooth device using this UART port which is occupied by the Serial Monitor, you will face some difficulties which can only be solved by an advanced learner.

Jeez, there is a hell of a lot of nonsense around here, and the above is just pompous claptrap. Translated for ordinary people, it simply means:

“Disconnect bluetooth from pins D0,D1 before uploading your programme”

That is all that separates a newbie from an “advanced learner” in this matter, and should have been in reply #1. Not much, really. This is due to your USB socket and hardware serial pins being internally shared.