1/6/2024 0 Comments Arduino bluetooth hc 05 code![]() ![]() Connect the HC-05 RX to Arduino pin 3 TX through a voltage divider. ![]() SoftwareSerial BTserial ( 2, 3 ) // RX | TX // Connect the HC-05 TX to Arduino pin 2 RX. Basic Bluetooth sketch HC-05_AT_MODE_01 // Connect the HC-05 module and communicate using the serial monitor // // The HC-05 defaults to commincation mode when first powered on you will need to manually enter AT mode // The default baud rate for AT mode is 38400 // See for details // #include I am using the HC-05_AT_MODE_01 sketch on the Arduino connected to the HC-05 and the HC-06_01 sketch on the Arduino connected to the HC-06 HC-05_AT_MODE_01 This means I do not need to change anything when switching between AT mode and Communication mode. On the HC-05, I have changed the baud rate used in the communication mode to 38400. The Arduino connected to the HC-05 is on COM8 and the Arduino using the HC-06 is on COM17 This gives me 2 separate serial monitors. I am using 2 different Arduino IDEs version 1.0.5 and version 1.6.3. If you have issues check the data sheet for your module. I am using the zs-040 modules with firmware 2.0-20100601 and other modules with the same firmware will be the same. When the HC-O5 is configured to pair with any address (AT+CMODE=1) it should connect to a Slave module automatically. ![]() Inbuilt Arduino so that the Arduino code can be uploaded to the relay module. Using the CMODE command we have an easy way to connect the HC-05 and the HC-06 (or 2 HC05s). Oficjalny dystrybutor Raspberry Pi i Arduino, moduy elektroniczne, sprzt lutowniczy dla robotykw, urzdzenia pomiarowe, minikomputery, pytki IoT, STM32. ARDUINO Bluetooth Joystick to control your robot Part 1. Making a connection Between a HC-05 and a HC-06: Method 1 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |