Skip to content

Instantly share code, notes, and snippets.

@pepf
Created April 22, 2014 08:21
Show Gist options
  • Save pepf/11169913 to your computer and use it in GitHub Desktop.
Save pepf/11169913 to your computer and use it in GitHub Desktop.
#include <SoftwareSerial.h>
// Blueduino comunicate with BLE module through pin11, pin12 as soft serial.
SoftwareSerial mySerial(11, 12); //RX,TX
String tmp;
void setup() {
// Start soft serial
mySerial.begin(9600);
};
void loop() {
// Read soft serial
while (mySerial.available() > 0) {
tmp += char(mySerial.read());
delay(2);
}
// If it got data from soft serial port then send them back to sender, to see if connection works
if(tmp.length() > 0) {
sendString(tmp);
tmp = "";
}
}
void sendString(String str) {
for(int i=0; i<str.length(); i++) {
char c = str.charAt(i);
mySerial.write(c);
}
}
@ZainRajput
Copy link

BRO I WANT search bar plugin which shuld search from my web site and also want google custom search plugin will u please give me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment