I was having the same problem, but using the cloud interface. I'm working with a Raspberry Pi and started seeing duplications of every line, so I tried the very simple sketch posted by gdsports at Anyone tried programming a Pi or BB from the cloud? - #5 by gdsports - General Discussion - Arduino Forum and continued to see the duplicated output.
Code:
void setup() {
CloudSerial.begin(115200);
}
uint32_t loopCount=0;
void loop() {
CloudSerial.print("hello ");
CloudSerial.println(loopCount++);
delay(1000);
}
Serial output:
hello 1
hello 1
hello 2
hello 2
helhello 3
lo 3
hello 4
hello 4
hello 5
hello 5
hello 6
hello 6
hello 7
hello 7
hello 8
hello 8
hhello 9
ello 9
I also saw "hello 0" show up twice and then get overwritten by the "hello 1" lines.
Then, I opened the developer tools in Chrome to look for Javascript errors, cleared the console, and reloaded the webpage to capture fresh data. Unexpectedly, my serial output was fixed! I'm only getting one of everything in every sketch I try, although the printing seems to be quite slow.
tldr: I had the same problem and refreshing the web page fixed it, mysteriously.