I am working with an arduino pro micro and I am facing a peculiar problem. The project I am working with includes arduino MKR NB 1500 as well. I am transferring data from MKR NB 1500 to arduino pro micro through Serial1(Rx/Tx pins). I have added the sample code that i am using on both boards
program in arduino MKR NB 1500
void setup() {
Serial1.begin(9600);
}
void loop() {
Serial1.print("printing");
delay(2000);
}
program in pro micro
#include "Keyboard.h"
void setup() {
Serial1.begin(9600);
Keyboard.begin();
}
void loop() {
Keyboard.write(Serial1.read());
}
I would like to transfer some data from MKR NB 1500 to pro micro which emulates a keyboard and prints the data in a editor. I am powering the arduino MKR NB 1500 via USB using its native USB port. The pro micro works as expected when I connect both these boards to USB ports in the same laptop. (Output: printingprintingprintingprinting)
However, the pro micro prints garbage values when I connect the MKR NB 1500 to a USB port belonging to a different laptop. (Output: a10joh<qqj<zstjo)
Is there any reason for such a behavior. Please let me know if you need more information from my side or if i have not made myself clear.