Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
bluetooth-serial [2017/01/25 17:26] arthur |
bluetooth-serial [2021/02/21 21:18] 127.0.0.1 external edit |
||
---|---|---|---|
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' | ||
- | [[image http:// | + | {{/external/https.web.archive.org.web.20161013235353im.http.gd1.alicdn.com.bao.uploaded.i1.14767031049461097.t1rryxxzxkxxxxxxxx.0.item.pic.jpg.400x400.jpg.webp}} |
- | 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 42: | Line 42: | ||
=== Arduino sketch: to program the HC-05 | === Arduino sketch: to program the HC-05 | ||
- | [[code]] | + | <code cpp> |
// SERIAL LOOP SKETCH FOR COMMUNICATING WITH A BLUETOOTH SPP MODULE | // SERIAL LOOP SKETCH FOR COMMUNICATING WITH A BLUETOOTH SPP MODULE | ||
Line 75: | Line 75: | ||
} | } | ||
} | } | ||
- | [[/code]] | + | </code> |
=== Configure the Bluetooth Module | === Configure the Bluetooth Module | ||
Line 104: | Line 104: | ||
You can also change the pairing key if you want, either for easier access or for privacy â my Macbook defaults to 0000, but the HC-05 defaults to 1234. To make it publicly accessible, give it a pin of 0000: AT+PSWD=0000 - to make it secure, pick any 4-digits that you will remember. | You can also change the pairing key if you want, either for easier access or for privacy â my Macbook defaults to 0000, but the HC-05 defaults to 1234. To make it publicly accessible, give it a pin of 0000: AT+PSWD=0000 - to make it secure, pick any 4-digits that you will remember. | ||
- | [[code]] | + | <code> |
AT+ORGL ï¼Restore the factory default stateï¼ | AT+ORGL ï¼Restore the factory default stateï¼ | ||
AT+UART=115200, | AT+UART=115200, | ||
AT+NAME=Smoothie | AT+NAME=Smoothie | ||
AT+PSWD=0000 | AT+PSWD=0000 | ||
- | [[/code]] | + | </code> |
There are other parameters in the AT command set, but none of them are relevant to getting the HC-05 working on the SmoothieBoard. | There are other parameters in the AT command set, but none of them are relevant to getting the HC-05 working on the SmoothieBoard. | ||
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: | ||
- | Reboot the SmoothieBoard and you should now be able to connect using a terminal app like CoolTerm or directly using your printer app (like [[[Pronterface]]]). | + | Reboot the SmoothieBoard and you should now be able to connect using a terminal app like CoolTerm or directly using your printer app (like [[Pronterface]]). |
In this configuration, | In this configuration, | ||
Line 129: | Line 123: | ||
In my experience, going over 230400 doesn' | In my experience, going over 230400 doesn' | ||
- | [[code]] | + | <code> |
# Serial communications configuration ( transmission rate default to 9600 if undefined ) | # Serial communications configuration ( transmission rate default to 9600 if undefined ) | ||
uart0.baud_rate | uart0.baud_rate | ||
- | [[/code]] | + | </code> |
It may be that you are able to perform the Bluetooth AT command setting using the SmoothieBoard itself, but I haven' | It may be that you are able to perform the Bluetooth AT command setting using the SmoothieBoard itself, but I haven' |