Maker Pro
Maker Pro

Bluetooth connection of 2 Arduino

Paul Jackson

Jun 10, 2017
1
Joined
Jun 10, 2017
Messages
1
In my first since forever Arduino and bluetooth test, I made a programmed association between 2 Arduino utilizing BlueSmirf modules. In light of the ubiquity of that post, it appears that many individuals are attempting to do likewise.

On the drawback, a large number of the guests are searching for an answer utilizing the HC-05 (or other HC-XX sort) modules with an AT command interface. I wanted to in the long run utilize this sort of gadget yet never got around to doing it for each terrible reason possible including delaying. This deferral was plainly inadmissible for Lyman (one of my perusers) who chosen to send me 2 additional modules he could save.

On a side note, this kind soul just has 2 adherents on Twitter. It would be ideal if you enable me to fix this appalling circumstance.

In the wake of playing a bit with my new toy, this is what I have:

In this first basic case, the code sets the module to be either Master or Slave, interfaces with one hard-coded address and begins the correspondence circle. While associated, the Master sends 1s and 0s to the slave who is utilizing this "command" to switch a LED on or off.
You can get the code on this Git repo.

The most serious issue was to make sense of how to reset the module automatically. The [not so good] documentation clarifies how this should be possible by cycling the power however the bluetooth chip has a reset stick that should do a similar trap. I have the code to utilize the reset stick which I got from this blog entry and I will test it soon.

On the HC-05 modules I got, the reset stick is not associated which "constrained" me into making a little hack that can scarcely be taken note.
The subsequent stage will be to reproduce a similar question and auto-interface circle that I did with the BlueSmirf. It ought to be straight forward since I've officially tried all the fundamental AT commands effectively.
 
Top