Pinguino Forum

Full Version: CDC Fnctions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi senior members,

I would like to ask about the CDC functions, since I cannot seem to get around using things such as .write, .read, .getString and so on, and they are not documented in the wiki page.

My intention is to use the CDC to communicate with Pure data. So far I have successfully sent and receive floats, but nothing more, I cant send or receive strings.

Any help would be much appreciated.

Thanks!Big Grin
Hi Roberto,
I've never tried to communicate with Pure Data myself but it seems someone did it. Did you read this ? https://groups.google.com/forum/#!topic/...M70EWx7zUQ ?

Anyway, if you want to send strings :
CDC.write(char c) : send one char at a time
CDC.printf(const char *format, arg1, arg2, ...) : send formatted string
see http://wiki.pinguino.cc/index.php/CDC.printf and http://wiki.pinguino.cc/index.php/Serial.printf for supported formats description.

If you want to get strings :
CDC.read(char *buffer);
buffer's length must be 64 bytes long (usb max packet size)
return number of chars actually read
see http://wiki.pinguino.cc/index.php/CDC.read

If you succeed can you write how you did it on this page ?
http://wiki.pinguino.cc/index.php/With_Pure_Data


(14-07-2013, 11:15 PM)RobertoB Wrote: [ -> ]Hi senior members,

I would like to ask about the CDC functions, since I cannot seem to get around using things such as .write, .read, .getString and so on, and they are not documented in the wiki page.

My intention is to use the CDC to communicate with Pure data. So far I have successfully sent and receive floats, but nothing more, I cant send or receive strings.

Any help would be much appreciated.

Thanks!Big Grin
Hi Regis,

Thanks for this, I am on it, I happen to have contacted the author of that thread as well Smile,

I will keep post of any progress!