1

The topic is pretty straight forward: When I use Keyboard.println(), it sends short (up to 30-ish) strings just fine, but when I get up around 100 characters there are random characters missing. "Random" - meaning it is not all the time, it's somewhat consistently the same characters missing though.

I've checked and the data is arriving at the Arduino correctly (over web service), but once it shows back up in the notepad, it's missing random stuff.

Any thoughts or suggestions?

Edit: Examples as requested:
I'm sending...

cheat SpawnDino Blueprint'/Game/PrimalEarth/Dinos/Pelagornis/PelaCharacter_BP.Pela_Character_BP' 10 1 1 10

And what's printing is...

cheat SpawnDino Blueprint'/Game/PRIMALEarth/Dinos/Pelgornis/PelaCharacter_BP.Pela_Character_bP' 10 1 1 10

I've actually noticed now that it's changing capitalization too, the BP to bP and Primal to PRIMAL.

4
  • Could you provide examples which compare the data arriving and the println output? Commented Dec 9, 2016 at 17:44
  • Not sure why it's happening, but you can probably avoid it by sending only a smaller number of characters at a time, and then add a small delay in between. Commented Dec 9, 2016 at 18:02
  • Yeah, thanks for the suggestion. I've already tried that though and it's being weird too.. Wont send anything when I nest a keyboard.anything inside of a for loop, regardless what the wait is set to.. Back to tinkering :) thanks. Commented Dec 9, 2016 at 18:07
  • Could you please provide your code? Commented Dec 10, 2016 at 4:28

1 Answer 1

2

I'd bet the issue is overflowing the keyboard buffer of the device you're talking to. On Windows, you can change a registry value to make the buffer larger:

http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/RegistryTips/Hardware/KeyboardBufferSize.html

(and in fact, the Windows keyboard buffer is 100 characters by default.)

The reason the capitalization is becoming strange is because the device missed the shift-down or shift-up event, so it's using whatever it would use if the shift key wasn't pressed or released.

The best solution is to avoid sending so much: break it down and send a little at a time as Gerben said.

1
  • I just got another idea how to do that instead of character by character since you said that.. Will give it a try, thanks a lot Commented Dec 10, 2016 at 0:19

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.