serial communication with LPC1768 in c++

09 Aug 2017

I would like to send a string through a c ++ program. how can I do ?

30 Aug 2017

Using the Serial (or RawSerial) class.

Serial target(D1, D0); // UART pins here

target.printf("Hoi!");
16 Oct 2017

I'm getting Type 'Serial' could not be resolved.

I can see Serial.h present in drivers directory

18 Oct 2017

The example doesn't show it, but be sure to include mbed.h. The following compiles for the LCP1768 target, however I didn't have a module handy to test/verify. The default speed is 9600 baud.

#include "mbed.h"

Serial target(USBTX, USBRX);

int main() {
    target.printf("Sum of 3 and 5 is ", 3 + 5);
}