Hi Erik,
Thanks for the response. However, I never get the B and C characters outputting. If I send "ABC" it only outputs A (essentially). If I understand what you're saying, shouldn't have I seen:
char 0: A char 1: [00] char 2: [00] char 3: [00] char 4: [00] char 5: [00] char 6: [00] char 7: [00] char 8: [00] char 9: [00]
char 0: B char 1: [00] char 2: [00] char 3: [00] char 4: [00] char 5: [00] char 6: [00] char 7: [00] char 8: [00] char 9: [00]
char 0: C char 1: [00] char 2: [00] char 3: [00] char 4: [00] char 5: [00] char 6: [00] char 7: [00] char 8: [00] char 9: [00]
Instead of just
char 0: A char 1: [00] char 2: [00] char 3: [00] char 4: [00] char 5: [00] char 6: [00] char 7: [00] char 8: [00] char 9: [00]
Is that correct?
Also question #2 (related):
Notice in my while loop I have a pc.printf commented out, when that was commented in, my outputting would stop after a while when I was typing things in, does having printf's in my test() function and in the main conflict somehow? Are they running in 2 threads?
Thanks!
Jeff.
Hello,
So, I ran into a problem. My Serial callback function that I attached is not working. I'm using it on pins USBTX/USBRX.
I saw a few posts about this with using mbed-RTOS, which I'm using. Some suggested using RawSerial. I switched to RawSerial and that did fix my problem with it hanging, however, RawSerial only see's one character of my string that I passed in.
I tried looping on the readable() function and tried calling getc() consecutive times, both only showed like 1 character was there, the first one I typed in a string.
I tried a couple of other 3rd party libs that were published with no good results. I'm looking for a way so I can type serial input and read it on my device. If I start a new project and use Serial, it all works great.
Is there a way to get the entire string buffer from RawSerial?
Thanks Jeff.