PinguinoIDE / pinguino-libraries

Pinguino librairies, keywords and other useful files.
24 stars 27 forks source link

lcd.printf - Too many parameters #5

Closed rblanchot closed 9 years ago

rblanchot commented 9 years ago

Compiling HelloWorld.pde for Pinguino PIC18G45K50, I get an error on line: lcd.printf("Uptime %02d:%02d:%02d", h,m,s);

rblanchot commented 9 years ago

This issue is not relative to a bug in the lcd library but in the IDE pre-processor (see also define.h issue #31 : https://github.com/PinguinoIDE/pinguino-ide/issues/31). Before it's solved, a simple workaround is to use only lcd.print or lcd.printf but not both in the same program. So in the HelloWorld.pde example just replace :

lcd.print("Hello, World!"); by lcd.printf("Hello, World!");

Note that you will have the same bug if you use Serial.print and Serial.printf in the same program.

rblanchot commented 9 years ago

Fixed by Yeison.