ESPcopter is currently crowdfunding, with differing reward levels available depending on the expansion boards and quantity desired.
In this project, we will send multi-ranger sensors data to our RemoteXY phone app and observe it.
The Multi-ranger shield gives lots of exciting new possibilities.
Multi-ranger shield has four vl53l0x laser laser-ranging sensor that can measure up to 1200mm the distance and look at the forward, backward, right and left.
#define REMOTE_XY_OWN
#include "remotexy.h"
#include <espcopter.h> // ESPcopter lib
void setup() {
mainSetup();
}
void loop() {
mainLoop (); // main loop
}
3-) Make a control interface on RemoteXY4-) Make RemoteXY Settings
SDK: http://espcopter.com/wp-content/uploads/2016/09/ESPcopter-SDKEnglish.pdf
Main code:#define REMOTE_XY_OWN
#include "remotexy.h"
#include <espcopter.h>
void setup() {
mainSetup();
}
void loop() {
mainLoop ();
RemoteXY.level_3 = round(Distance_Y_0()/10);
RemoteXY.level_2 = round(Distance_Y_1()/10);
RemoteXY.level_1= round(Distance_X_0()/10);
RemoteXY.level_4 = round(Distance_X_1()/10);
}
remotexy.h//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
#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,0,0,4,0,35,0,8,13,0,
66,193,12,25,31,11,2,26,66,1,
45,1,11,23,2,26,66,65,45,38,
11,24,2,26,66,129,57,25,33,11,
2,26 };
// this structure defines all the variables of your control interface
struct {
// output variable
int8_t level_1; // =0..100 level position
int8_t level_2; // =0..100 level position
int8_t level_3; // =0..100 level position
int8_t level_4; // =0..100 level position
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
Result:ESPcopter is currently crowdfunding, with differing reward levels available depending on the expansion boards and quantity desired.
Comments
Please log in or sign up to comment.