Use RemoteXY for Android communication


sketch for the design as in the photo how?
for materials
arduino nano
L298N module

please guide me.. :smiley:

/////////////////////////////////////////////
// RemoteXY include library //
// use ANDROID app version 3.1.1 or up //
/////////////////////////////////////////////

/* RemoteXY select connection mode and include library */
#define REMOTEXY_MODE__SOFTWARESERIAL
#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[] =
{ 5,0,110,0,2,0,2,0,41,13
,18,7,6,79,78,0,79,70,70,0
,2,0,41,31,18,7,1,79,78,0
,79,70,70,0,2,0,41,48,18,7
,2,79,78,0,79,70,70,0,4,48
,7,8,9,54,1,4,48,83,8,9
,54,1,129,0,41,10,17,3,9,76
,69,68,32,100,101,112,97,110,0,129
,0,41,28,18,3,9,76,69,68,32
,116,101,110,103,97,104,0,129,0,42
,45,15,3,9,76,69,68,32,98,108
,105,110,107,0 };

/* this structure defines all the variables of your control interface */
struct {

/* input variable /
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 /
signed char slider_1; /
=-100..100 slider position /
signed char slider_2; /
=-100..100 slider 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 8
#define PIN_SWITCH_3 11

void setup()
{
RemoteXY_Init ();

pinMode (PIN_SWITCH_1, OUTPUT);
pinMode (PIN_SWITCH_2, OUTPUT);
pinMode (PIN_SWITCH_3, 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);

// TODO you loop code
// use the RemoteXY structure for data transfer

}