Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
bluetooth-serial [2021/02/20 15:16] arthur |
bluetooth-serial [2021/02/22 16:47] (current) |
||
---|---|---|---|
Line 15: | Line 15: | ||
You can also use a BLE (Bluetooth Low Energy) or BT4.0 device like the HC-10, but you will need a comms device that talks BLE/BT4.0 and not many computers do (a recent-model Apple Macbook Pro/Air will be able to, my recent-model HP doesn' | You can also use a BLE (Bluetooth Low Energy) or BT4.0 device like the HC-10, but you will need a comms device that talks BLE/BT4.0 and not many computers do (a recent-model Apple Macbook Pro/Air will be able to, my recent-model HP doesn' | ||
- | {{https:// | + | {{//external/ |
- | I prefer the CZ over the JY for a few reasons | + | I prefer the CZ over the JY for a few reasons |
Of course, some of the US manufacturers make some great boards with superior features and wonderful quality control, but that comes at a price - personally I like paying $4 for a bluetooth module, rather than $25-30. | Of course, some of the US manufacturers make some great boards with superior features and wonderful quality control, but that comes at a price - personally I like paying $4 for a bluetooth module, rather than $25-30. | ||
Line 38: | Line 38: | ||
GND to HC-05 GND | GND to HC-05 GND | ||
5V to HC-05 VCC | 5V to HC-05 VCC | ||
- | 5v to HC-05 KEY or HC-05 P34 - adding a signal (or voltage) to this pin when you power it on puts the HC-05 in command mode, where you can program the features. Some manufacturers break P34 out on the breakout board, but leave the pin un-soldered, | + | 5v to HC-05 KEY or HC-05 P34 - adding a signal (or voltage) to this pin when you power it on puts the HC-05 in command mode, where you can program the features. Some manufacturers break P34 out on the breakout board, but leave the pin un-soldered, |
=== Arduino sketch: to program the HC-05 | === Arduino sketch: to program the HC-05 | ||
- | < | + | < |
// SERIAL LOOP SKETCH FOR COMMUNICATING WITH A BLUETOOTH SPP MODULE | // SERIAL LOOP SKETCH FOR COMMUNICATING WITH A BLUETOOTH SPP MODULE | ||
Line 81: | Line 81: | ||
Connect/ | Connect/ | ||
- | Recycle the Arduino and the HC05 should initialise and slowly flash its LED â | + | Recycle the Arduino and the HC05 should initialise and slowly flash its LED this indicates it is in Command Mode. |
Bring up the Arduino IDE serial monitor and set to 9600+CR+LF | Bring up the Arduino IDE serial monitor and set to 9600+CR+LF | ||
Line 92: | Line 92: | ||
Connection mode: Connect to the Bluetooth device specified | Connection mode: Connect to the Bluetooth device specified | ||
Transmission rate: 38,400 bps; Stop bit: 1 bit; Parity bit: None. | Transmission rate: 38,400 bps; Stop bit: 1 bit; Parity bit: None. | ||
- | Passkey: | + | Passkey: |
- | Device name: âH-C-2010-06-01â | + | Device name: H-C-2010-06-01 |
The first thing to do is to ensure the module is set to factory defaults, using the AT+ORGL command. | The first thing to do is to ensure the module is set to factory defaults, using the AT+ORGL command. | ||
Line 102: | Line 102: | ||
Change the device name: AT+NAME=Smoothie (or anything you like: KillR3D, MyPrinter, Arthur, KZ223398 - the module don't care. | Change the device name: AT+NAME=Smoothie (or anything you like: KillR3D, MyPrinter, Arthur, KZ223398 - the module don't care. | ||
- | You can also change the pairing key if you want, either for easier access or for privacy | + | You can also change the pairing key if you want, either for easier access or for privacy |
< | < | ||
Line 114: | Line 114: | ||
Connect the female DuPont cables to the 4 UART pins on the Smoothie (next to the USB connector - labelled TX RX V+ GND) and the corresponding pins on the HC-05 breakout and power up the board. | Connect the female DuPont cables to the 4 UART pins on the Smoothie (next to the USB connector - labelled TX RX V+ GND) and the corresponding pins on the HC-05 breakout and power up the board. | ||
- | |||
- | [[image https:// | ||
- | |||
- | [[image https:// | ||
- | |||
- | [[image https:// | ||
=== Connect: | === Connect: |