8.1 Communication via Terminal (printf)

Select “printf“ support in the Communication Settings section of the library.

If a warning of pin conflict appears, switch to the Pin Grid View tab and select PORTC pin connections for RXD and TXD. If using another setup besides the one described at the beginning of the document, select the desired port pin configuration.

Generate, build the project, and program the device. Open Data Visualizer in the MPLAB toolbar.

In the MPLAB Data Visualizer tab, select the Curiosity Nano COM channel settings and update the baud rate to 460800.

Select the Connect button to start the communication.

When prompted, select the Send to Terminal option.

The COM port will change the status to “CAPTURING” when the communication line is active. Long press the MPPB button to reboot and see the starting message prompt on the terminal.

After a short press, the motor is ramping up, and the terminal depicts the Motor Speed in RPM, average current consumption, input voltage, temperature sensor, and the potentiometer value in percentage.