Skip to content

mtinet/AICar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AICar

아두이노 메가 사용 시 블루투스 내부 배선

앱인벤터

serviceUUID : 0000FFE0-0000-1000-8000-00805F9B34FB
name : 아두이노의 AT커맨드로 자기가 지정해 준 이름 입력  
  • 아두이노 AT 커맨드 사용할 때 업로드 해야하는 코드, 블루투스 모듈(HM-10)이 다른 장치에 연결되지 않은 상태에서만 AT 커맨드가 적용됨, 아두이노의 시리얼 모니터 하단에 있는 옵션에서는 'line ending 없음' 또는 'Both NL & ER'을 선택하고, 통신속도는 9600보드레이트로 선택함
void setup() {
  //통신 설정
  Serial.begin(9600); // 시리얼 통신(컴퓨터-USB케이블-아두이노 메가)
  Serial3.begin(9600); // 블루투스 통신(스마트폰 앱-블루투스-아두이노 메가)
  Serial.println("start");
}

void loop() {
  if (Serial3.available())        // 블루투스에서 데이터가 들어올 경우
    Serial.write(Serial3.read()); // 컴퓨터로 보냄
  if (Serial.available())         // 컴퓨터에서 데이터가 들어올 경우
    Serial3.write(Serial.read()); // 블루투스로 보냄
}

참고자료

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published