hello everyone,
for a project i am using a HC-05 module but it does not receive any data when i send data by apps like arduino bluetooth control. when i use remote xy it does receive data and switches a relay, but when it has to switch multiple relays at one time it open all of them when i need for example only 3 to switch. someone who knows what the problem could be?? thank you to the one who can really help me.
/*
-- gip bluetooth --
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 3.1.13 or later version
download by link http://remotexy.com/en/library/
To connect using RemoteXY mobile app by link http://remotexy.com/en/download/
- for ANDROID 4.13.13 or later version;
- for iOS 1.10.3 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
#include <RemoteXY.h>
// RemoteXY GUI configuration
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = // 138 bytes
{ 255,7,0,0,0,131,0,17,0,0,0,31,1,106,200,1,1,7,0,2,
3,8,44,22,0,2,26,16,16,79,78,0,79,70,70,0,2,56,9,44,
22,0,2,26,31,31,79,78,0,79,70,70,0,2,5,45,44,22,0,2,
26,31,31,79,78,0,79,70,70,0,2,56,46,44,22,0,2,26,31,31,
79,78,0,79,70,70,0,2,6,84,44,22,0,2,26,31,31,79,78,0,
79,70,70,0,2,57,84,44,22,0,2,26,31,31,79,78,0,79,70,70,
0,2,30,124,44,22,0,2,26,31,31,79,78,0,79,70,70,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t switch_01; // =1 if switch ON and =0 if OFF
uint8_t switch_02; // =1 if switch ON and =0 if OFF
uint8_t switch_03; // =1 if switch ON and =0 if OFF
uint8_t switch_04; // =1 if switch ON and =0 if OFF
uint8_t switch_05; // =1 if switch ON and =0 if OFF
uint8_t switch_06; // =1 if switch ON and =0 if OFF
uint8_t switch_07; // =1 if switch ON and =0 if OFF
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_01 4
#define PIN_SWITCH_02 5
#define PIN_SWITCH_03 6
#define PIN_SWITCH_04 7
#define PIN_SWITCH_05 8
#define PIN_SWITCH_06 9
#define PIN_SWITCH_07 10
void setup()
{
RemoteXY_Init ();
pinMode (PIN_SWITCH_01, OUTPUT);
pinMode (PIN_SWITCH_02, OUTPUT);
pinMode (PIN_SWITCH_03, OUTPUT);
pinMode (PIN_SWITCH_04, OUTPUT);
pinMode (PIN_SWITCH_05, OUTPUT);
pinMode (PIN_SWITCH_06, OUTPUT);
pinMode (PIN_SWITCH_07, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_SWITCH_01, (RemoteXY.switch_01==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_02, (RemoteXY.switch_02==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_03, (RemoteXY.switch_03==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_04, (RemoteXY.switch_04==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_05, (RemoteXY.switch_05==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_06, (RemoteXY.switch_06==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_07, (RemoteXY.switch_07==0)?LOW:HIGH);
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay(), use instead RemoteXY_delay()
}

