전체상품목록 바로가기

본문 바로가기


현재 위치
  1. home
  2. community
  3. 기술문의 :)

기술문의 :)

기술문의 게시판 입니다.

상품 게시판 상세
subject connect가 안됩니다.
writer 아트로봇 (ip:)
  • date 2014-08-06 10:46:04
  • like 추천하기
  • view 43
rating 0점

안녕하세요

 

안드로이드 기기에서  블루투스 모뎀 검색은 되는지요?  그리고  페어링까지 완료되셨는지요?

 

안드로이드기기와의 커넥팅은  안드로이드 기기에서  장치 탐색후  페어링을 해주셔야 완료됩니다.

아래의 소스코드는 모뎀과 안드로이드기기간의 연결이라기보다는 아두이노와 블루투스 모뎀의 연결후 세팅을 한뒤  통신을 시작한다는 코드입니다.

 

더불어 블루투스 전원이 켜진후 일정시간내에만 CMD모드 진입이 허용됩니다.

전원인가후 오래 방치후 시리얼모니터 창을 여시면 CMD모드 진입이 안될수 있으므로

 

모뎀 전원이 켜진상태를 기준으로  일정시간 내에   시리얼모니터 창을 켜서 CMD 모든 진입이 되도록 해주셔야합니다.

 

 

아트로봇 드림

 


---------- Original Message ----------

 해당 블루투스를 연결을 다 하고 안드로이드와 통신을 시도하려고 해고 start의 빨간 불만 깜빡 거리고

connect의 녹색불은 깜빡이지 않습니다.


RX는 흰색선 TX는 검은색선 VCC는 초록색선 GND는 주황색선 입니다.


아래는 소스 코드 입니다.


#include

int bluetoothTx = 2;  // TX-O pin of bluetooth mate, Arduino D2
int bluetoothRx = 3;  // RX-I pin of bluetooth mate, Arduino D3

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

void setup()
{
  Serial.begin(9600);  // Begin the serial monitor at 9600bps

  bluetooth.begin(115200);  // The Bluetooth Mate defaults to 115200bps
  bluetooth.print("$");  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");  // Enter command mode
  delay(100);  // Short delay, wait for the Mate to send back CMD
  bluetooth.println("U,9600,N");  // Temporarily Change the baudrate to 9600, no parity
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  bluetooth.begin(9600);  // Start bluetooth serial at 9600
}

void loop()
{
  if(bluetooth.available())  // If the bluetooth sent any characters
  {
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read()); 
  }
  if(Serial.available())  // If stuff was typed in the serial monitor
  {
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
  }
  // and loop forever and ever!
}




file
password 삭제하려면 비밀번호를 입력하세요.
댓글 수정

password :

/ byte

비밀번호 : 확인 취소

댓글 입력

commentsname : password : 관리자 답변 보기

/ byte

왼쪽의 문자를 공백없이 입력하세요.(대소문자구분)

회원에게만 댓글 작성 권한이 있습니다.

관련 글 보기

관련글 모음
번호 상품명 제목 작성자 작성일 조회
14421 [TSW12576] 블루투스 확장보드(Bluetooth Mate Silver) 이것과 hc 06의 차이점이 뭔가요?? 한상하 2015-07-06 3
14427 [TSW12576] 블루투스 확장보드(Bluetooth Mate Silver) 이것과 hc 06의 차이점이 뭔가요?? 아트로봇CT 2015-07-06 1
14056 [TSW12576] 블루투스 확장보드(Bluetooth Mate Silver) 아두이노 프로미니와 호환 장기휘 2015-05-21 4
14057 [TSW12576] 블루투스 확장보드(Bluetooth Mate Silver) 아두이노 프로미니와 호환 가능합니다. 아트로봇CT 2015-05-21 175
14028 [TSW12576] 블루투스 확장보드(Bluetooth Mate Silver) connect와 command mode가 동시에 되지 않습니다. 김경수 2015-05-20 156