9 years, 8 months ago.

How use the usb connector on mbed LPC1768 to communicate with a computer?

Hello ,

I want to use the USB connector on the Mbed to communicate with a computer (teraterm) but i can't read the packet? I have this simple program:

  1. include "mbed.h"

Serial pc(USBTX, USBRX); tx, rx

int main() { pc.printf("Hello World!\n"); }

This program is Ok ?

Thank you for your answer .

try :

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc (USBTX, USBRX);

int q;

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);

        pc.printf ("Hello Terminal ! \t %d\r\n",q++);

    }
}

quite a few terminal programs need \r\n to actually write to the screen/editor

Also you need to install the windows driver for MBED

http://mbed.org/handbook/Windows-serial-configuration

Download latest driver..

Ceri

posted by ceri clatworthy 15 Jul 2014
Be the first to answer this question.

Assigned to Mickaël BARRE 9 years, 8 months ago.

This means that the question has been accepted and is being worked on.