1

Topic: servo over internet

Hi how can i conect a servo and control it over internet. I try but dont know what it went bad.

*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266WIFI_LIB_CLOUD
#include <ESP8266WiFi.h>

#include <RemoteXY.h>

// RemoteXY connection settings


#define REMOTEXY_WIFI_SSID "ssid"
#define REMOTEXY_WIFI_PASSWORD "pasword"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "7be61463064988e6e3903aa9d7rr32a2"


// RemoteXY configurate 
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,11,0,10,13,1,
  4,0,24,22,14,43,2,26 };
 
// this structure defines all the variables and events of your control interface
struct {

   // input variables
  uint8_t select_1; // =0 if select position A, =200 if position B, =500 if position C, =1000

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

} RemoteXY;
#pragma pack(pop)

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


#include <Servo.h>
Servo myservo;



void setup()
{
  RemoteXY_Init ();
   myservo.attach(9);
  RemoteXY.select_1 = 50;



  // TODO you setup code
 
}

void loop()
{
  RemoteXY_Handler ();
  int ms = RemoteXY.select_1;
  myservo.writeMicroseconds(ms);
 

}