////// Name und Passwort des HC-05 Bluetooth-Moduls aendern /////////// // //You can send AT Commands to the HC-05 from the Arduino IDE Serial Monitor while the Arduino is running the attached Arduino program. // // WIRING: // // HC-05 GND --- Arduino GND Pin // HC-05 VCC (5V) --- Arduino 5V // HC-05 TX --- Arduino Pin 10 (soft RX) // HC-05 RX --- Arduino Pin 11 (soft TX) // HC-05 Key/EN (PIN 34) --- Arduino Pin 9 // // alles ausser VCC anschließen, Arduino mit Programmm an USB anschliessen, dann Knopf auf BT-Modul drücken und gleichzeitig VCC an BT-Modul anschliessen // // Seriellen Monitor oeffnen, dann AT-Befehle eingeben // // To return HC-05 to default settings: "AT+ORGL" // To get version of your HC-05 enter: "AT+VERSION?" // To change device name from the default HC-05 to let's say MYBLUE enter: "AT+NAME=MYBLUE" // To change default security code from 1234 to 2987 enter: "AT+PSWD=2987" // To change HC-05 baud rate from default 9600 to 115200, 1 stop bit, 0 parity enter: "AT+UART=115200,1,0" #include SoftwareSerial BTSerial(10, 11); // RX | TX void setup() { pinMode(9, OUTPUT); // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode digitalWrite(9, HIGH); Serial.begin(9600); Serial.println("Enter AT commands:"); BTSerial.begin(38400); // HC-05 default speed in AT command more } void loop() { // Keep reading from HC-05 and send to Arduino Serial Monitor if (BTSerial.available()) Serial.write(BTSerial.read()); // Keep reading from Arduino Serial Monitor and send to HC-05 if (Serial.available()) BTSerial.write(Serial.read()); }