A5 and printf in Linux terminal
myoung

Greetings,

I'm working on making a program on the Raspberry Pi that uses the Raspberry Pi camera and raspistill program to take pictures, detect motion, and then uses mail to email me the triggering image when there's motion detected. I'm using Allegro 5 for analyzing the pictures taken through system calls. This is a terminal application and I'm not creating a display, keeping it text only. I'm noticing that after I call al_init() that printf doesn't output to the terminal and any output it did do up until that point is seemingly cleared. If I end the program before al_init() is executed then my text output is there. As a kludge, I've been writing debugging output information to strings formatted as echo commands and doing system calls of said strings. That works, and I know another option would be to create a display and use al_draw_text to draw text to the display, though just wondering if there's any way I can get printf to work in the terminal. Thanks!

- Mike

SiegeLord

Hmm, that's odd. I just tried ex_utf8 on my Raspberry Pi and it seemed to output things to the termina fine. Could you try that example and see if it works for you?

myoung

Thanks SiegeLord! I included common.c and using open_log_monospace, log_printf, and close_log functions are giving me the results I wanted.

Thread #616712. Printed from Allegro.cc