Skip to content

Instantly share code, notes, and snippets.

@pfeerick
Created December 18, 2016 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfeerick/f795ef4b6203ca4efb93eb8bdcc3d92a to your computer and use it in GitHub Desktop.
Save pfeerick/f795ef4b6203ca4efb93eb8bdcc3d92a to your computer and use it in GitHub Desktop.
Demo sketch showing how to configure a Digistump Oak's wifi manually without a Particle connection
SYSTEM_MODE(MANUAL);
#include <ESP8266WiFi.h>
//Static IP stuff
char SSID[] = "yournetwork"; // your network SSID
char passwd[] = "yourpassword"; // your network password
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
//don't save these details
WiFi.persistent(false);
//start the WiFi connection process
WiFi.begin_internal(SSID, passwd, 0, NULL);
//wait for WiFi to connect
while (WiFi.status() != WL_CONNECTED)
{
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
delay(100);
}
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment