I always got kinda put off by not having sussed out the CDC feature,while others said to work well... And this is here the rWINdows comes with its tantrums... I found out !!
It is better if you turn it off first, restart the board if needed( I'm using the vs X.3 of the IDE ) and VOILA : there it is !!
/* Blink a LED Increment counter to delay; CDC display debugging */ u16 a=0; void setup() { // initialize the digital pin 13 as an output. pinMode(13, OUTPUT); } void loop(){ if (a==100) { a=0; } a++; toggle(13); // alternate ON and OFF delay(a); // wait for a second //CDC.printf( "cntr \"%d\"\r\n", a); CDC.printf( "\n\r Dec cntr --- " ); CDC.print( a, DEC ); delay(1); }
The WIKI also explains how to install the driver for the CDC feature...
"Prepare the connection to the pinguino device by installing the driver from: HERE
You will have a COMx connection when you plug the usb cable to the computer.
Step 2: Write the following in the Pinguino IDEvoid setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: CDC.println("\n\r Hello World!!!"); }Step 3: Compile and upload the code.Step 4: Select Menu->Pinguino->Debug Mode->USB CDC And on the bottom section the port x on which the device is connected and there you go:Hello World!!!"PS: (22/07/13) Regis, from Pinguino Forum, explained it in a quite concise way,,,:"... if you want to send strings :CDC.write(char c) ; // send one char at a timeCDC.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"
Reference : http://wiki.pinguino.cc/index.php/CDC.print
PINGUINO COMMUNITY @ Google
Pinguino WIKI