Created
December 12, 2013 01:53
In the following example, the MAC address of the Slave Bluesmirf is 000666123ABC. The example also assumes that the RX and TX are connected to pins 0 and 1. Here's the code for both Master ans Slave:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Master code | |
void setup() { | |
Serial.begin(115200); | |
Serial.print("$$$"); | |
delay(100); | |
Serial.println("SM,1"); delay(100); | |
Serial.println("C,000666123ABC"); | |
delay(100); | |
Serial.println("---"); | |
} | |
//Slave code | |
void setup() { | |
Serial.begin(115200); | |
Serial.print("$$$"); | |
delay(100); | |
Serial.println("SM,0"); | |
delay(100); | |
Serial.println("---"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment