#include <HM12.h>
#include <SoftwareSerial.h>
HM12 bluebee(2,3);
void setup() {
Serial.begin(115200);
bluebee.begin(115200);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
delay(1000);
bluebee.print("hello"); //testing, to see bluebee able to send hello to the connected device
if(bluebee.available()>0)
{
int rssi= bluebee.getRSSI(); //declare rssi
while(bluebee.available())
{
rssi=bluebee.read();
bluebee.print("RSSI=");
bluebee.print(rssi);
delay(2000);
}
}
bluebee.end();
}
#include <HM12.h>
#include <SoftwareSerial.h>
HM12 BlueBee(2,3);
void setup() {
Serial.begin(115200);
BlueBee.begin(115200);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
delay(3000);
int rssi= BlueBee.getRSSI();
Serial.println(rssi);
}
Users browsing this forum: No registered users and 36 guests