10 years, 2 months ago.

RN-42 Bluetooth module with mbed lpc1768, I can not display the reading from the meter on LCD

<<code>>

  1. include "mbed.h"
  2. 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());

} } }

Be the first to answer this question.