Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int incomingByte = 0; // for incoming serial data
- void setup() {
- Serial.begin(9600);//Arduino to Computer over USB
- Serial1.begin(9600);//BB to Ardunio UART
- }
- void loop() {
- // send data only when you receive data:
- if (Serial.available() > 0) {
- // read the incoming byte:
- incomingByte = Serial.read();
- // say what you got:
- Serial.print("I sent: ");
- Serial.println(incomingByte, DEC);
- Serial1.print(incomingByte);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement