Topic: WEMOS D1 Mini - Servo
Hello,
I have the following problem:
I would like to control over the WEMOS D1 mini a Servo by means of Slider. The sketch shows no error and the transfer is also OK. I get the message in the WLAN: "RemoteXY - Not in range". When I load another sketch on the WEMOS (for example turning on the LED with a switch) everything works without problems. The WEMOS is set up as an access point. Can someone help me?
Here's the sketch:
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT
#include <ESP8266WiFi.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,1,0,0,0,11,0,8,13,1,
4,32,24,14,10,77,2,26 };
// this structure defines all the variables of your control interface
struct {
// input variable
int8_t slider_1; // =-100..100 slider position
// 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(7);
RemoteXY.slider_1 = 50;
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
// TODO you loop code
// use the RemoteXY structure for data transfer
int ms= RemoteXY.slider_1*20*500;
myservo.writeMicroseconds(ms);
}
Thank you for your help and best regards
Joachim