Another guide how to wire the HCo6 and 4 Channel Relay for switching, The HC06 modules uses BlueCore is a single chip radio and baseband IC for Bluetooth 2.4GHz system including enhance data rates (EDR) to 3Mbps. for more details please refer the the CSRBC417 Datasheet.
The chip BlueCore has been designed to reduce the number of external components required. The device incorporates auto-calibration and built in self-test BIST routine to simplify the development. All hardware and device firmware is fully complaints with the Bluetooth version 2.0 plus EDR specification.
Configuration and customization settings using AT Command please refer to this link.
Required Components
- Arduino UNO, NANO, DUE, LEO, MEGA, MINI PRO (w/d TTL USB)
- HC06 Bluetooth Module
- 8 Channel Relay Board 5V
- Jumper Wires / Duppont Wires
- Solder Less Bread Board
Wiring Guide
Android Application
https://play.google.com/store/apps/details?id=com.a14core.relaycommander
Sketch Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
/* 14CORE Test Code for: Android Relay Commander .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int R1 = 5; int R2 = 6; int R3 = 7; int R4 = 8; int R5 = 9; int R6 = 10; int R7 = 11; int R8 = 12; char data = 0; void setup() { Serial.begin(9600); pinMode(R1, OUTPUT); pinMode(R2, OUTPUT); pinMode(R3, OUTPUT); pinMode(R4, OUTPUT); pinMode(R5, OUTPUT); pinMode(R6, OUTPUT); pinMode(R7, OUTPUT); pinMode(R8, OUTPUT); } void loop() { if (Serial.available()) { data = Serial.read(); Serial.print(data); } if(data == '1001'){ digitalWrite(R1, 0); } if(data == '1002'){ digitalWrite(R1, 1); } if(data == '1003'){ digitalWrite(R2, 0); } if(data == '1004'){ digitalWrite(R2, 1); } if(data == '1005'){ digitalWrite(R3, 0); } if(data == '1006'){ digitalWrite(R3, 1); } if(data == '1007'){ digitalWrite(R4, 0); } if(data == '1008'){ digitalWrite(R4, 1); } if(data == '1009'){ digitalWrite(R5, 0); } if(data == '1010'){ digitalWrite(R5, 1); } if(data == '1011'){ digitalWrite(R6, 0); } if(data == '1012'){ digitalWrite(R6, 1); } if(data == '1013'){ digitalWrite(R7, 0); } if(data == '1014'){ digitalWrite(R7, 1); } if(data == '1015'){ digitalWrite(R8, 0); } if(data == '1016'){ digitalWrite(R8, 1); } } |
Downloads
Download CSRBC417 Datasheet | PDF
Download AT-Command Reference | PDF