It is a big challenge to convert all printf at the time of porting various c or C++ programs to Arduino board. But if you are using chipKIT max32 board, the work is very much simplied due to the availability of the serial port2(RX2,Tx2). The printf for microchip pic32 C libraries are written for serial port2 by defualt. So just after configurting the serial 2 using Serial2.begin(baud rate), all printf are directed to this port .
Code snipped is as follows
Serial2.begin(9600); // once the serial 2 is configured, we can use this port for communication .
}Like this Leave a comment