The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.2.22 (Linux)
File Line Function
/showthread.php 864 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CDC.printf does not appear to be working properly
04-03-2012, 12:43 AM,
#1
CDC.printf does not appear to be working properly
Hi - just got a few new Pinguinos from Olimex, and installed X.3 from SVN

I am having a little trouble getting something as simple as CDC.printf() to work.

The code:

Code:
void setup()
{                
  // initialize the digital pin 13 as an output.
  pinMode(13, OUTPUT);    
}

void loop()
{
    
    while (true)
    {
        
    
        toggle(13);            // alternate ON and OFF
        delay(500);            // wait for 500 ms
        CDC.printf("%d\n",100);
        
    }
}

...and the output:


devuser@work-SM40S:/dev$ cat <ttyACM0
-1610580020
-1610580020
-1610580020
-1610580020
-1610580020
-1610580020
-1610580020
-1610580020


Have I totally lost it - i.e. what is going on - is there a bug in the implementation of printf (same happens with float, double, anything passed on as a parameter to char *format..)[/quote].?

Also, the reason why I'm doing a cat above is I can't seem to get the Pinguino IDE to attach to the CDC tty (/dev/ttyACM0).

This is under Lubuntu (Oneiric) and Pinguino IDE X.3 r249
The board is an Olimex PIC32 Pinguino OTG
Can anyone help out?
Reply


Messages In This Thread
CDC.printf does not appear to be working properly - by acmbc68 - 04-03-2012, 12:43 AM
RE: CDC.printf does not appear to be working properly - by acmbc68 - 04-03-2012, 11:57 AM
RE: CDC.printf does not appear to be working properly - by acmbc68 - 04-03-2012, 04:57 PM
RE: CDC.printf does not appear to be working properly - by acmbc68 - 06-03-2012, 01:14 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)