1

Topic: Arduino2560 with HM-10 "DEVICE NOT REPLY"

Hi all!

I have been trying to connect my 2560 with a hm-10 to the remotexy app but can't get it to connect as i keep receiving the "Error: Device not reply" message. I have used TX to pin 51 and RX to pin 50. I have attached my code below which was made by RemoteXY. Thanks in advance for your help!

/ RemoteXY select connection mode and include library
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>

#include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 50
#define REMOTEXY_SERIAL_TX 51
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate 
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,3,0,0,0,40,0,10,8,0,
  2,0,21,13,22,11,2,26,31,31,
  79,78,0,79,70,70,0,1,0,66,
  42,12,12,2,31,88,0,1,0,31,
  36,12,12,2,31,88,0 };
 
// this structure defines all the variables and events of your control interface
struct {

    // input variables
  uint8_t switch_1; // =1 if switch ON and =0 if OFF
  uint8_t button_1; // =1 if button pressed, else =0
  uint8_t button_2; // =1 if button pressed, else =0

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_SWITCH_1 13
#define PIN_BUTTON_1 11
#define PIN_BUTTON_2 26


void setup()
{
  RemoteXY_Init ();
 
  pinMode (PIN_SWITCH_1, OUTPUT);
  pinMode (PIN_BUTTON_1, OUTPUT);
  pinMode (PIN_BUTTON_2, OUTPUT);
 
  // TODO you setup code
 
}

void loop()
{
  RemoteXY_Handler ();
 
  digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_2, (RemoteXY.button_2==0)?LOW:HIGH);
 
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay()


}