* ECHO communication between Bluetooth and RS232 * Using mBED Landtiger Card
Fork of HC05_Transparent_mode by
Diff: main.cpp
- Revision:
- 3:8783bfb5d8fa
- Parent:
- 2:f76f36540871
- Child:
- 4:c68d2d96da42
--- a/main.cpp Fri Oct 18 21:39:18 2013 +0000 +++ b/main.cpp Fri Aug 15 12:18:04 2014 +0000 @@ -1,21 +1,22 @@ /* * Author: Edoardo De Marchi - * Date: 02-07-13 + * Date: 11-08-14 * Notes: HC05 Trasparent Mode */ #include "mbed.h" -#define SERIAL_1 - Serial pc(USBTX, USBRX); -#ifdef SERIAL_1 -Serial blue(p9,p10); // HC05 + +#if defined(TARGET_LPC1768) +Serial blue(p9, p10); // TX, RX +//Serial blue(p13, p14); // TX, RX +#elif defined(TARGET_LPC4330_M4) +Serial blue(P6_4, P6_5); // UART0_TX, UART0_RX +//Serial blue(P2_3, P2_4); // UART3_TX, UART3_RX #endif -#ifdef SERIAL_2 -Serial blue(p13,p14); // TX = P14 RX = P13 -#endif + DigitalOut myled(LED1); DigitalOut myled4(LED4); @@ -24,8 +25,8 @@ int main() { - blue.baud(9600); - pc.baud(9600); + blue.baud(115200); + pc.baud(115200); pc.printf("Bluetooth Start\r\n"); // echo back characters and toggle the LED