![]() Note: the micro:bit has beed updated to V2.0 version therefore, you can get more details for KS0426 V2.0 basic kit in the following link: 9.3 How to Import Makecode Extension Library.7.2 Keyestudio Micro:bit Mini Smart Car.If you have a spare FTDI USB-to-UART module, you can connect that directly to the Bluetooth module and program it using a terminal app. It may be that you are able to perform the Bluetooth AT command setting using the SmoothieBoard itself, but I haven't investigated that method. ![]() Uart0.baud_rate 115200 # Baud rate for the default hardware serial port # Serial communications configuration ( transmission rate default to 9600 if undefined ) Stick with 115,200 or 230,400 as UART speeds - this is set in the config file: In my experience, going over 230400 doesn't really give you anything except the likelihood of more errors. The BT SPP link itself is capable of upwards of 3Mb/s, given perfect radio conditions. In this configuration, the UART is set to 115,200 bps, but the HC-05 is capable of 230,400bps, 460,800bps - right up to 1,382,400, although at those rates you will probably be experiencing some significant percentage of comms errors. 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). There are other parameters in the AT command set, but none of them are relevant to getting the HC-05 working on the SmoothieBoard.Ĭonnect 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. ![]() 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.ĪT+ORGL ï¼Restore the factory default stateï¼ĪT+UART=115200,0,0 ï¼Set transmission rate to 115,200 bps, one stop bit and no parity bitï¼ 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. ![]() Set the transmission rate to 115,200 bps: AT+UART=115200,0,0 Change the device name: AT+NAME=Smoothie (or anything you like: KillR3D, MyPrinter, Arthur, KZ223398 - the module don't care. The first thing to do is to ensure the module is set to factory defaults, using the AT+ORGL command. Passkey: 1234 Device name: H-C- (or some variant depending on what is programmed in the firmware). Slave Mode Connection mode: Connect to the Bluetooth device specified Transmission rate: 38,400 bps Stop bit: 1 bit Parity bit: None. Is the HC LED slowly pulsing or fast? If it is fast, you aren't in command mode - go back over the steps above. If not, check your settings and electrical connections. ![]() Recycle the Arduino and the HC05 should initialise and slowly flash its LED this indicates it is in Command Mode.īring up the Arduino IDE serial monitor and set to 9600+CR+LFĮnter AT and you should get OK back. 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.Ĭonnect/power on the Arduino, load the Arduino IDE and load the sketch above. I prefer the CZ over the JY for a few reasons it is really small, it is really well made, it has the KEY (P34, state pin) already broken out and it does level shifting of all the pins back to the 3.3V required by the HC module, unlike some of the other breakouts. 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't), so by sticking to the HC-05 you can be sure of being compatible with the majority of devices. If every JY-MCU being sold on Aliexpress was actually made by Linvor, they would be an extremely profitable company.įor an SPP module, I recommend the HC-05 Bluetooth 2.1 EDR (Enhanced Data Rate) module on a breakout board (like the JY-MCU or my personal favourite, the CZ-HC-05) If you are buying from one of the well-known Chinese market sites, check the reviews of of that product in the shop you are buying from. The ubiquitous JY-MCU breakout board has been copied and made by a vast number of Chinese board manufacturers and not all of them are good - some add level shifting for all pins from 5-7V to the 3.3V needed by the HC module, some only level shift the power pins - you get what you pay for. Be careful what you buy - not all HC modules are created equal, just as not all JY-MCU breakout boards with HC-05 modules are the same. The most popular of these SPP modules are the 'HC' series of modules. ![]()
0 Comments
Leave a Reply. |