This project is based around the NerdForge Project…
I bought some WeMos D1 Minis from AliExpress to play around with this. My idea is to get my head around them by first creating one with a button and one with an LED strip and doing a simple On/Off. Then I can look at adding a microphone and lighting patterns.
Introduction to WeMos D1 Mini to start off…
In the second example in the link above remember to change the Baud rate to 115200 to match the code.
To see the feedback from the WeMos D1 Mini you need to open the serial monitor.
On the Serial monitor, remember to change the baud rate there as well so it can read the data sent back….
The next step would be to see if I can connect it to an existing WiFi network, the end goal will be to have one create a new network and the others connect to that but for now let see if we can connect to an existing one.
The code below should connect to a wireless network and return an IP Address.
#include <ESP8266WiFi.h>
// Set WiFi credentials
#define WIFI_SSID "YOUR SSID NAME"
#define WIFI_PASS "YOUR SSID Password"
void setup() {
// Setup serial port
Serial.begin(115200);
Serial.println();
// Begin WiFi
WiFi.begin(WIFI_SSID, WIFI_PASS);
// Connecting to WiFi...
Serial.print("Connecting to ");
Serial.print(WIFI_SSID);
// Loop continuously while WiFi is not connected
while (WiFi.status() != WL_CONNECTED)
{
delay(100);
Serial.print(".");
}
// Connected to WiFi
Serial.println();
Serial.print("Connected! IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// put your main code here, to run repeatedly:
}
It works!