Reference.WiFiScanNetworks History

Hide minor edits - Show changes to output

May 18, 2012, at 06:32 PM by Scott Fitzgerald -
Changed lines 19-20 from:
byte
to:
byte : number of discovered networks
November 22, 2011, at 08:46 AM by Scott Fitzgerald -
Changed lines 7-8 from:
Scan WiFi networks available and returns the discovered number
to:
Scans for available WiFi networks and returns the discovered number
Changed lines 23-24 from:
[@
to:
(:source lang=arduino:)
#include <SPI.h>
Changed line 55 from:
@]
to:
(:sourceend:)
November 22, 2011, at 03:53 AM by Scott Fitzgerald -
Added lines 1-54:
[[WiFi]]

!!WiFi.scanNetworks()

!!!!Description

Scan WiFi networks available and returns the discovered number

!!!!Syntax

WiFi.scanNetworks(); \\

!!!!Parameters

none

!!!!Returns

byte

!!!!Example

[@
#include <WiFi.h>

char ssid[] = "yourNetwork"; // the name of your network
int status = WL_IDLE_STATUS; // the Wifi radio's status

byte mac[6]; // the MAC address of your Wifi shield


void setup()
{
Serial.begin(9600);

status = WiFi.begin(ssid);

if ( status != WL_CONNECTED) {
Serial.println("Couldn't get a wifi connection");
while(true);
}
// if you are connected, print your MAC address:
else {

Serial.println("** Scan Networks **");
byte numSsid = WiFi.scanNetworks();

Serial.print("SSID List:");
Serial.println(numSsid);
}
}

void loop () {}
@]

Share