This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
pidflight:bluetooth [2017/07/24 18:25] cmengler [Alternative] |
pidflight:bluetooth [2018/03/22 15:47] cmengler [Arduino] |
||
---|---|---|---|
Line 16: | Line 16: | ||
* **AT+PIN<XX... X>** (e.g AT+PIN0000 to set module pairing pin to "0000") | * **AT+PIN<XX... X>** (e.g AT+PIN0000 to set module pairing pin to "0000") | ||
- | ==== Alternative ==== | + | <WRAP center round info 80%> |
- | An alternative option to setting up the Bluetooth module without an FTDI adapter is the use the **bluetooth-hc06.hex** with an Arduino Nano. | + | Some generic HC-06 modules labelled **ZS-040** may use a variant of AT commands to configure the module. If the above commands do not work, please refer to the **ZS-040** section below. |
+ | </WRAP> | ||
+ | |||
+ | ==== ZS-040 ==== | ||
+ | These AT commands have been verified with **AT+VERSION** command that returns **VERSION:3.0-20170609**. | ||
+ | * **AT+UART=115200,0,0** (sets the baud rate to 115200) | ||
+ | * **AT+NAME=<new name>** (e.g AT+NAME=PIDflight to set module name to "PIDflight") | ||
+ | |||
+ | |||
+ | ==== Arduino ==== | ||
+ | An alternative option to setting up the Bluetooth module without an FTDI adapter is the use the **bluetooth-passthru.hex** with an Arduino Nano. This HEX file creates a software serial connection to the Bluetooth module on D6/D7 pins and relays input from the serial terminal to the Bluetooth module. | ||
- Connect the HC-06 to Arduino Nano: | - Connect the HC-06 to Arduino Nano: | ||
Line 24: | Line 34: | ||
- Arduino (D7) -> HC-06 (RX) | - Arduino (D7) -> HC-06 (RX) | ||
- Arduino (GND) -> HC-06 (GND) | - Arduino (GND) -> HC-06 (GND) | ||
- | - Flash the {{:pidflight:bluetooth-hc06.zip|}} HEX file to the Arduino Nano. | + | - Flash the {{:pidflight:bluetooth-passthru.zip|}} HEX file to the Arduino Nano. |
- | - Once the HEX file has been flashed, allow 5 seconds for the Bluetooth module settings to take effect. | + | - Once the HEX file has been flashed, open up a serial terminal (e.g. Serial Monitor within Arduino IDE) to the COM port of the Arduino Nano with baud rate 115200. |
- | - Done. | + | - Type "**AT**" into the serial terminal, "**AT> OK**" response should return to indicate the Bluetooth module is responding to AT commands. |
- | + | - Proceed with configuring the Bluetooth module with AT commands. | |
- | The **bluetooth-hc06.hex** will set the HC-06 Bluetooth module name to **PIDFLIGHT** and baud rate to **115200**. | + | |
===== HM-10 ===== | ===== HM-10 ===== |