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.
8 years, 7 months ago.
serial communication
hello, when i am trying to send string with more than 3 character it cant print on serial monitor. it only print always when we use upto 3 character. why?? give me solution for long string. here is my program:
- include "mbed.h"
Serial pc(USBTX, USBRX, 9600);
int main() { char buffer[128];
while(1) { pc.gets(buffer, 7); if(strcmp(buffer,"somesh")==0) { pc.printf("Hii '%s'\nWELCOME TO ARM Mbed.\n\n", buffer);
} } }