Can printf be used, in this form on the 3pi? make shows no errors. And
it’s in the AVR Command Library.
lcd_init_printf(“hello, world”);
Can’t get it to work.
donde
Can printf be used, in this form on the 3pi? make shows no errors. And
it’s in the AVR Command Library.
lcd_init_printf(“hello, world”);
Can’t get it to work.
donde
Hello,
Have you taken a look at the avr-libc printf documentation?
You need to use the following linker options (LDFLAGS in Makefile) to get the printf functionality:
-Wl,-u,vfprintf -lprintf_min
to enable minimal printf (without floating-point support).
-Paul
Hi Paul,
I did see the reference, but didn’t look very closely. What I wanted to try is the old K&R v2 example of temperature conversion, using printf. But, of course it would be printing to the LCD. Decided to use modulus method you show in the timer 3pi-demo. Found modulus doesn’t handle negative numbers very well and kept getting 2 minus signs in the display. Able to fix by multiplying by minus 1. Now get a slick conversion table on LCD. Don’t what I’ll use it for. Just to do it again was a challenge (for me) and fun when it finally worked.
donde.