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