Last active
December 2, 2019 11:40
-
-
Save RobolinkAkademi/094aec420a72a2b73aee07e983e0c856 to your computer and use it in GitHub Desktop.
HC-05 AT komut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#define RxD 7 //HC-05 Tx | |
#define TxD 8 //HC-05 Rx | |
SoftwareSerial blueToothSerial(RxD,TxD); | |
void setup() | |
{ | |
Serial.begin(38400); | |
blueToothSerial.begin(38400); | |
pinMode(RxD, INPUT); | |
pinMode(TxD, OUTPUT); | |
} | |
void loop() { | |
if (blueToothSerial.available()) { | |
int inByte = blueToothSerial.read(); | |
Serial.write((char)inByte); | |
} | |
if (Serial.available()) { | |
int inByte = Serial.read(); | |
blueToothSerial.print((char)inByte); | |
} | |
} | |
/* | |
COMMAND FUNCTION | |
1 AT Test UART Connection | |
2 AT+RESET Reset Device | |
3 AT+VERSION Querry firmware version | |
4 AT+ORGL Restore settings to Factory Defaults | |
5 AT+ADDR Query Device Bluetooth Address | |
6 AT+NAME Query/Set Device Name | |
7 AT+RNAME Query Remote Bluetooth Device’s Name | |
8 AT+ROLE Query/Set Device Role | |
9 AT+CLASS Query/Set Class of Device CoD | |
10 AT+IAC Query/Set Inquire Access Code | |
11 AT+INQM Query/Set Inquire Access Mode | |
12 AT+PSWD Query/Set Pairing Passkey | |
13 AT+UART Query/Set UART parameter | |
14 AT+CMODE Query/Set Connection Mode | |
15 AT+BIND Query/Set Binding Bluetooth Address | |
16 AT+POLAR Query/Set LED Output Polarity | |
17 AT+PIO Set/Reset a User I/O pin | |
18 AT+MPIO Set/Reset multiple User I/O pin | |
19 AT+MPIO? Query User I/O pin | |
20 AT+IPSCAN Query/Set Scanning Parameters | |
21 AT+SNIFF Query/Set SNIFF Energy Savings Parameters | |
22 AT+SENM Query/Set Security & Encryption Modes | |
23 AT+RMSAD Delete Authenticated Device from List | |
24 AT+FSAD Find Device from Authenticated Device List | |
25 AT+ADCN Query Total Number of Device from Authenticated Device List | |
26 AT+MRAD Query Most Recently Used Authenticated Device | |
27 AT+STATE Query Current Status of the Device | |
28 AT+INIT Initialize SPP Profile | |
29 AT+INQ Query Nearby Discoverable Devices | |
30 AT+INQC Cancel Search for Discoverable Devices | |
31 AT+PAIR Device Pairing | |
32 AT+LINK Connect to a Remote Device | |
33 AT+DISC Disconnect from a Remote Device | |
34 AT+ENSNIFF Enter Energy Saving mode | |
35 AT+EXSNIFF Exit Energy Saving mode | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment