๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

Lora Feather Board Wireless Data Transfer
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Lora Feather Board Wireless Data Transfer

by vishu_fcb on Wed Mar 06, 2019 9:43 am

Hello,
I am trying to send data from one Lora feather board to another. My transmitter side feather board is connected to rs 485 converter and data is sent to the TX side via Putty. This data should be received on the RX Lora feather board.
For example, when I am pressing 'd' on putty, I am receiving the binary converted value of 'd' on RX side i.e '1100100'. Can anyone help me on how to receive the character 'd' instead of its binary notation.
TX code is as follows:


int getTelegram() {
char *p = bufRX485, str, br, output[9];
int i , n , rs485count = 0;
for (i = 0; i <= 1000; i++) {
if (Serial1.available()) {
br = Serial1.read();
Serial.println(br);
*p = br;
p++;
rs485count++;
itoa(br, output, 2);
puts(output);
++br;
rf95.send((uint8_t*)output, sizeof(output));
rf95.waitPacketSent();
}

RX code is as follows:

uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);

if (rf95.recv(buf, &len))
{
digitalWrite(LED, HIGH);
RH_RF95::printBuffer("Received: ", buf, len);
Serial.print("Got: ");
Serial.println((char*)buf);


Serial.print("RSSI: ");
Serial.println(rf95.lastRssi(), DEC);

}

I am stuck at it since long. Any help would be appreciable
Regards

vishu_fcb
 
Posts: 7
Joined: Sat Dec 01, 2018 6:31 pm

Please be positive and constructive with your questions and comments.