Created
June 18, 2012 17:36
-
-
Save jonmarkgo/2949583 to your computer and use it in GitHub Desktop.
Basic WiFly Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <WiFly.h> | |
char* ssid = "my$ssid$lol"; //enter your SSID here, replace all spaces with $ (ex. "my ssid lol" = "my$ssid$lol") | |
char* pass = "abc123"; //enter your wifi passphrase here | |
char* serverAddress = "1.2.3.4"; //enter the IP of your node.js server | |
int serverPort = 1337; //enter the port your node.js server is running on, by default it is 1337 | |
WiFlyClient client; | |
void setup() { | |
Serial.begin(9600); | |
WiFly.setUart(&Serial); | |
WiFly.begin(); | |
WiFly.join(ssid, pass, true); | |
client.connect(serverAddress,serverPort); | |
} | |
void loop() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment