33 lines
636 B
C++
33 lines
636 B
C++
#pragma once
|
|
|
|
#include <ESP8266WiFi.h>
|
|
#include <WiFiUdp.h>
|
|
|
|
class PixelBot
|
|
{
|
|
public:
|
|
PixelBot();
|
|
~PixelBot();
|
|
|
|
void FindServer();
|
|
|
|
private:
|
|
char serverIp[16];
|
|
int serverPort = -1;
|
|
|
|
// ~~~ Auto Discovery System ~~~ //
|
|
|
|
// The address that the PixelHub beacon is broadcasting on.
|
|
IPAddress beaconAddress = IPAddress(239, 62, 148, 30);
|
|
// The port number that the PixelHub beacon is broadcasting on.
|
|
unsigned int beaconPort = 5050;
|
|
|
|
// The size of the datagram buffer that is used to buffer incoming messages.
|
|
int datagramBufferSize = 256;
|
|
|
|
// ~~~ ~~~ //
|
|
|
|
// The TCP client
|
|
WiFiClient tcpClient = WiFiClient();
|
|
};
|
|
|