11 years ago.

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

dear all I used rn-42 Bluetooth module connected to lpc1768 through pin9 and pin 10. I consider this as a master by making the proper setting via Tera Term and I set authentication to be 0. my slave address is 001C0500D414. after inquery scan I get my slave device and save it in RN-42 module. then status give me connected. now I want to receive the reading from the slave and display it in LCD(I used mbed application board). but I did not get anything please advise for correct code. the code I used below.

  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());

} } }

Hi Sami, can you use <<code>> <</code>> tag to read better your code. Can you send a picture of the responses that you receive?

Greetings

posted by Ney Palma 26 Sep 2014
Be the first to answer this question.

Assigned to Sami Alshorman 11 years ago.

This means that the question has been accepted and is being worked on.