Pages: [1]   Go Down
Author Topic: Bluetooth arduino problem!  (Read 817 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have a bluetooth arduino (from http://pcb-europe.net ) connected to 2 batteries (2 x 1.2 volt) for some minutes it works and could be found by the PC bluetooth and works greatly but then after 10 minutes it could not be found as a bluetooth device. I search it from different computers and different nokia bluetooth mobile phones but could not be found. It could be found only in the moment i reset it but it lasts some seconds and could not be associated with the PC?! Could someone help me, please?


Thank you
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

do you have anything connected to it?

D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

No i have nothing connected to it and this is the second bt arduino board i have changed for the same problem!

Thank you
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Is it posibble to be misprogrammed and has lost the bluetooth funcionality as i send the following code to chip.


int incomingByte = 0;      // for incoming serial data
int ledPin = 13;
int count=0;

void setup() {
      Serial.begin(115200);      // opens serial port, sets data rate to 9600 bps
        pinMode(ledPin, OUTPUT);
}

void loop() {
        Serial.print(count);
      // send data only when you receive data:
      if (Serial.available() > 0) {
            incomingByte = Serial.read();
                if(incomingByte == 0)
                      digitalWrite(ledPin, LOW);
                else if(incomingByte == 1)
                      digitalWrite(ledPin, HIGH);
      }
}

Can you help me please, what to do?

Thank you
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
try deleting the BT from the computer's serial port list, and setting it up again.

D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

The problem is that it could not be found also from the other computers or mobile phones. I think i have overwritten the  setup function in a wrong way as i described above!

Thank you
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Finally i resolved the problem.

Thank you very much.
Logged

Forum Administrator
Offline Offline
Newbie
*****
Karma: 3
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

can you explain what you did?

this might be useful for other users....


massimo
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I will explain my problem with the BT arduino and i'll tell also how i resolved it.
The frirst 10 minutes everything seemed allright but when i compiled and uploaded the following code,
the bluetooth funcionality was broken, i mean that it was not possible to detect the blutooth hardware(arduino) either from the PC or from mobile phone. I see that it was possible to detect the bluetooth harware only when i reseted the board(arduino) and it lasts only some seconds as the chip starts to procede with the loop funcion.
So after hours spend over the internet for resolving the problem i had an idea that resolved my problem.
I reseted the bt arduino and in that moment i was searching from bluetooth software of PC for detecting that, as it was detected it asks you for the key, enter the default key "12345" before advancing in this procedure you need to reset the board in order that BT arduino drivers will be installed(if you fail repeat the process from the begining, you need to exertion those seconds the bluetooth could be recognized).
After this procede with arduino software to upload any working code you would like( i used led_blink example), becarefull here you need to set the COM port and if it does not appear restart the arduino software and imediately reset BT arduino in order that the port COM appears in TOOLS/Serial port, then you have to reset the board and imediately upload the code( repeat this last step for some times if you don't succede, you need to find the right intervall of time).
If you need more information i could be disposable.

The wrong code was:

int incomingByte = 0;      // for incoming serial data
int ledPin = 13;
int count=0;
 
void setup() {
     Serial.begin(115200);      // opens serial port, sets data rate to 9600 bps
       pinMode(ledPin, OUTPUT);
}
 
void loop() {
       Serial.print(count);
     // send data only when you receive data:
     if (Serial.available() > 0) {
           incomingByte = Serial.read();
               if(incomingByte == 0)
                     digitalWrite(ledPin, LOW);
               else if(incomingByte == 1)
                     digitalWrite(ledPin, HIGH);
     }
}

Thank You
Logged

Pages: [1]   Go Up
Jump to: