Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 2 months ago.
Output is not showing on the console
#include "mbed.h" DigitalOut myled(LED1); Serial pc(USBTX,USBRX); int main() { pc.baud(9600); while(1) { pc.printf("hello"); printf("Hello"); myled = 1; wait(0.2); myled = 0; wait(0.2); } }
Today I created the sample project as shown in above and I selected the wiznet device w7500 but printing the data on console is not working and I used "Cool Term" as console. if I used the old project printing the data on console is working fine.
1 Answer
6 years, 2 months ago.
Hi Irayya, Since you have defined a serial object, it is recommended that you invoke printf on the same object throughout the program.
"pc.printf()"
Also, could you please point us to your old project that prints data to the console that you used as reference?
Thanks, Naveen, team mbed