10 years, 9 months ago.

Tera Term serial.

I don't see the Mbed in serial ports. I do see storage device. Is there a USB driver for Windows that I am missing? Code compiles success

  1. include "mbed.h" Serial pc(USBTX, USBRX); tx, rx PwmOut led(LED1); float brightness=0.5; int main() {

pc.printf("Control of LED dimmer by host terminal\n\r"); pc.printf("Press u = brighter, d = dimmer\n\r"); while(1) { char c = pc.getc(); wait(0.001); if((c == 'u') && (brightness < 0.1)) { brightness += 0.001; led = brightness; } if((c == 'd') && (brightness > 0.0)) { brightness -= 0.001; led = brightness; } led = brightness; pc.printf("%c %1.3f \n \r",c,brightness); } }

sorry I did not get the code in correctly

posted by James Cullins 22 Aug 2013

1 Answer

10 years, 9 months ago.

To put code correctly, use <<code>> and <</code>> (on seperate lines from the code).

Regarding your problem, USB drivers for serial: http://mbed.org/handbook/Windows-serial-configuration

Accepted Answer