Serielle Kommunikation - HC-05/HC-06 Bluetooth-Module
HC-05 Default: 9600 | HC-06: 9600
Bei 8N1: 1 Startbit + 8 Datenbits + 1 Stopbit = 10 Bit pro Byte
AT-Modus: Key-Pin HIGH beim Start oder 38400 Baud beim Boot
// Hardware Serial
void setup() {
Serial.begin(9600); // 9600 Baud, 8N1
}
void loop() {
if (Serial.available()) {
char data = Serial.read();
Serial.write(data); // Echo
}
}
RXD braucht Spannungsteiler 5V→3.3V!
1 Startbit (LOW) + 8 Datenbits (LSB first) + 1 Stopbit (HIGH)