Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- const int rxpin = 2;
- const int txpin = 3;
- SoftwareSerial bluetooth(rxpin, txpin);
- void setup(){
- Serial.begin(38400);
- bluetooth.begin(38400);
- }
- void loop(){
- if(bluetooth.available()){
- char c = bluetooth.read();
- Serial.write(c);
- }
- if(Serial.available()){
- char c = Serial.read();
- bluetooth.write(c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement