Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- int bluetoothTx = 2;
- int bluetoothRx = 3;
- SofwareSerial bluetooth(bluetoothTx, bluetoothRx);
- void setup(){
- Serial.begin(9600);
- bluetooth.begin(115200);
- bluetooth.print("$");
- bluetooth.print("$");
- bluetooth.print("$");
- delay(100);
- bluetooth.println("u,9600,N");
- bluetooth.begin(9600);
- }
- void loop(){
- if bluetooth.available()){
- Serial.print((char)bluetooth.read());
- }
- if(Serial.available()){
- bluetooth.print((char)Serial.read());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment