But how could it be then explained, that if I don't use this "Pages" it works just fine, but in that flow with the pages, it totally errors out?
Here is the config that errors out:
//////////////////////////////////////////////
// RemoteXY include library //
// use library version 2.2.2 or up //
// use ANDROID app version 3.5.1 or up //
//////////////////////////////////////////////
/* RemoteXY select connection mode and include library */
#define REMOTEXY_MODE__HC05_SOFTSERIAL
#include <SoftwareSerial.h>
#include <RemoteXY.h>
/* RemoteXY connection settings */
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
/* RemoteXY configurate */
unsigned char RemoteXY_CONF[] =
{ 28,6,123,1,5,5,4,4,0,3
,11,5,16,2,3,4,0,9,11,5
,16,2,3,4,0,3,31,5,16,2
,3,4,0,9,31,5,16,2,3,4
,0,83,10,5,16,2,3,4,0,89
,10,5,16,2,3,4,0,83,34,5
,16,2,3,4,0,89,34,5,16,2
,3,2,0,4,12,10,5,2,1,79
,78,0,79,70,70,0,2,0,4,19
,10,5,2,1,79,78,0,79,70,70
,0,2,0,4,26,10,5,2,1,79
,78,0,79,70,70,0,2,0,4,33
,10,5,2,1,79,78,0,79,70,70
,0,2,0,4,40,10,5,2,1,79
,78,0,79,70,70,0,2,0,4,47
,10,5,2,1,79,78,0,79,70,70
,0,3,3,89,11,4,10,2,1,1
,0,81,11,6,6,2,1,65,0,1
,0,81,19,6,6,2,1,66,0,1
,0,91,24,6,6,2,1,88,0,1
,0,81,27,6,6,2,1,67,0,1
,0,91,32,6,6,2,1,72,0,1
,0,81,35,6,6,2,1,68,0,1
,0,81,42,6,6,2,1,69,0,1
,0,91,40,6,6,2,1,71,0,1
,0,87,48,6,6,2,1,70,0,5
,0,1,9,23,23,2,4,5,0,76
,30,22,22,2,4,66,130,3,10,13
,10,2,2,66,130,3,22,13,10,2
,2,66,130,3,35,13,10,2,2,66
,130,83,12,13,10,2,2,66,130,83
,25,13,10,2,2,66,130,83,39,13
,10,2,2,131,1,2,3,15,5,2
,1,80,97,103,101,95,49,0,131,0
,2,55,15,5,2,2,80,97,103,101
,95,50,0,131,0,80,3,15,5,2
,3,80,97,103,101,95,51,0,131,0
,81,55,15,5,2,4,80,97,103,101
,95,52,0 };
/* this structure defines all the variables of your control interface */
struct {
/* input variable */
signed char slider_1; /* =0..100 slider position */
signed char slider_2; /* =0..100 slider position */
signed char slider_3; /* =0..100 slider position */
signed char slider_4; /* =0..100 slider position */
signed char slider_5; /* =0..100 slider position */
signed char slider_6; /* =0..100 slider position */
signed char slider_7; /* =0..100 slider position */
signed char slider_8; /* =0..100 slider position */
unsigned char switch_1; /* =1 if switch ON and =0 if OFF */
unsigned char switch_2; /* =1 if switch ON and =0 if OFF */
unsigned char switch_3; /* =1 if switch ON and =0 if OFF */
unsigned char switch_4; /* =1 if switch ON and =0 if OFF */
unsigned char switch_5; /* =1 if switch ON and =0 if OFF */
unsigned char switch_6; /* =1 if switch ON and =0 if OFF */
unsigned char select_1; /* =0 if select position A, =1 if position B, =2 if position C, ... */
unsigned char button_1; /* =1 if button pressed, else =0 */
unsigned char button_2; /* =1 if button pressed, else =0 */
unsigned char button_7; /* =1 if button pressed, else =0 */
unsigned char button_3; /* =1 if button pressed, else =0 */
unsigned char button_8; /* =1 if button pressed, else =0 */
unsigned char button_4; /* =1 if button pressed, else =0 */
unsigned char button_5; /* =1 if button pressed, else =0 */
unsigned char button_9; /* =1 if button pressed, else =0 */
unsigned char button_6; /* =1 if button pressed, else =0 */
signed char joystick_1_x; /* =-100..100 x-coordinate joystick position */
signed char joystick_1_y; /* =-100..100 y-coordinate joystick position */
signed char joystick_2_x; /* =-100..100 x-coordinate joystick position */
signed char joystick_2_y; /* =-100..100 y-coordinate joystick position */
/* output variable */
signed char level_1; /* =0..100 level position */
signed char level_2; /* =0..100 level position */
signed char level_3; /* =0..100 level position */
signed char level_4; /* =0..100 level position */
signed char level_5; /* =0..100 level position */
signed char level_6; /* =0..100 level position */
/* other variable */
unsigned char connect_flag; /* =1 if wire connected, else =0 */
} RemoteXY;
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_1 13
#define PIN_SWITCH_2 13
#define PIN_SWITCH_3 13
#define PIN_SWITCH_4 13
#define PIN_SWITCH_5 13
#define PIN_SWITCH_6 13
void setup()
{
RemoteXY_Init ();
pinMode (PIN_SWITCH_1, OUTPUT);
pinMode (PIN_SWITCH_2, OUTPUT);
pinMode (PIN_SWITCH_3, OUTPUT);
pinMode (PIN_SWITCH_4, OUTPUT);
pinMode (PIN_SWITCH_5, OUTPUT);
pinMode (PIN_SWITCH_6, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_3, (RemoteXY.switch_3==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_4, (RemoteXY.switch_4==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_5, (RemoteXY.switch_5==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_6, (RemoteXY.switch_6==0)?LOW:HIGH);
// TODO you loop code
// use the RemoteXY structure for data transfer
}
Dne ponedeljek, 20. junij 2016 23.43.17 UTC+2 je oseba Dean Cording napisala: