Improved documentation for IP configuration

This commit is contained in:
Scott Lawson 2016-12-27 21:09:06 -07:00
parent d57165ee91
commit 7b3f95af18
2 changed files with 7 additions and 9 deletions

View File

@ -9,9 +9,8 @@
#define BUFFER_LEN 1024 #define BUFFER_LEN 1024
// Wifi and socket settings // Wifi and socket settings
//const char* ssid = "LAWSON-LINK-2.4"; const char* ssid = "YOUR_WIFI_SSID";
const char* ssid = "led_strip"; const char* password = "YOUR_WIFI_PASSWORD";
const char* password = "felixlina10";
unsigned int localPort = 7777; unsigned int localPort = 7777;
char packetBuffer[BUFFER_LEN]; char packetBuffer[BUFFER_LEN];
@ -21,10 +20,10 @@ static Pixel_t pixels[NUM_LEDS];
WiFiUDP port; WiFiUDP port;
// Network information // Network information
IPAddress ip(192, 168, 137, 150); // IP must match the IP in config.py
IPAddress gateway(192, 168, 137, 1); IPAddress ip(192, 168, 0, 150);
//IPAddress ip(192, 168, 0, 150); // Set gateway to your router's gateway
//IPAddress gateway(192, 168, 0, 1); IPAddress gateway(192, 168, 0, 1);
IPAddress subnet(255, 255, 255, 0); IPAddress subnet(255, 255, 255, 0);
void setup() { void setup() {
@ -52,7 +51,6 @@ uint8_t N = 0;
void loop() { void loop() {
// Read data over socket // Read data over socket
int packetSize = port.parsePacket(); int packetSize = port.parsePacket();
// If packets have been received, interpret the command // If packets have been received, interpret the command
if (packetSize) { if (packetSize) {
digitalWrite(0, 1); digitalWrite(0, 1);

View File

@ -10,7 +10,7 @@ GAMMA_TABLE_PATH = os.path.join(os.path.dirname(__file__), 'gamma_table.npy')
"""Location of the gamma correction table""" """Location of the gamma correction table"""
UDP_IP = '192.168.137.150' UDP_IP = '192.168.137.150'
"""IP address of the ESP8266""" """IP address of the ESP8266. Must match IP in ws2812_controller.ino"""
UDP_PORT = 7777 UDP_PORT = 7777
"""Port number used for socket communication between Python and ESP8266""" """Port number used for socket communication between Python and ESP8266"""