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.
10 years, 1 month ago.
RN-42 Bluetooth module with mbed lpc1768, I can not display the reading from the meter on LCD
<<code>>
- include "mbed.h"
- include "C12832.h" C12832 lcd(p5, p7, p6, p8, p11); Serial RNBT(p9,p10); void initialise_connection() { RNBT.putc('$'); Enter command mode RNBT.putc('$'); RNBT.putc('$'); wait(0.5); RNBT.putc('C'); RNBT.putc(','); Send MAC address RNBT.putc('0'); RNBT.putc('0'); RNBT.putc('1'); RNBT.putc('C'); RNBT.putc('0'); RNBT.putc('5'); RNBT.putc('0'); RNBT.putc('0'); RNBT.putc('D'); RNBT.putc('4'); RNBT.putc('1'); RNBT.putc('4'); wait(0.5);
RNBT.putc('-'); Exit command mode RNBT.putc('-'); RNBT.putc('-'); RNBT.putc(0x0D); wait(0.5); } char x; void initialise_connection(void);
int main() { RNBT.baud(115200); initialise_connection(); while (1) { if (RNBT.readable()) { lcd.printf("%d\n",RNBT.getc());
} } }