Introduction

The shield uses WizFi210 which is a low power-consuming WIFI module which is applied with dynamic power management technology. When the WIFI module needs to be on but not work, it can be set to Standby mode a low power mode, and the module just needs to be woken up when it has to work. The WIFI wireless module is based on WizFi210. It provides the bridging from TTL serial port communication to IEEE802.11b/g/n wireless communication. So any device with TTL serial ports can easily be connected with this WIFI module and controlled and managed remotely through a wireless network. Different kinds of communication protocols and encryption algorithms are integrated with the module. The Arduino architecture enables you to easily integrate this module into any Arduino based project.

Features

Specifications

Documents

Shield Pin Allocation

Pin Function
Digital 0 RX
Digital 1 TX

Wifi Shield

Initial Setup

The wifi shield is actually quite straight away. You can take it as a serial communication device. For arduino code, you only need the following code:

Serial.print()

However, before making it work, you need to configure the wifi as any standard wifi device.

jumper configurations

The Wifi shield has 2 sets of jumpers and one switch.

Pin Function
USB wifi configuration (AT mode)
WIFI Arduino to wifi communication
NONE shield disable. Allows Arduino programming

Jumper settings

setting Function
RUN wifi configuration (AT mode)
PROG Arduino to wifi communication

switch settings

AT Mode Configuration

To enter AT Mode set the jumpers to "USB" and the switch to "RUN" use a terminal program like PuTTy and connect to the Arduino's com port at 115200 Bps.

Configuring PuTTy

Before you open a PuTTy session you should configure PuTTy to display your input and the module's output.

Step 1: Set local Echo Step 2: configure com port Please change the com port value to your Arduino's com port. You can check this in the Arduino's IDE.

AT Commands

The following AT commands are a quick review of the essentials needed to get your Wifi Shield connected to your network with a UDP server running on port 4000. This is not meant to be an all encompassing tutorial. If you would like to make a more complex setup please refer to the WizFi datasheet provided in the documents section of this wiki for a complete list of AT commands and their description.

Command Function
AT ENTER AT MODE
AT+WD DISASSOCIATE FROM PREVIOUS CONNECTION
AT+WWPA=AP_PASSWORD SET WIRELESS PASSWORD. FOR MORE SECURITY OPTIONS PLEASE SEE Pg28 OF WizFi DATASHEET V101
AT+NDHCP=1 ENABLE DHCP SETTINGS. AUTO-ASSIGN IP ADDRESS. YOU MIGHT WANT TO DISABLE THIS OPTION "0" AND SET YOUR OWN IP ADDRESS. SEE WIZFI DATASHEET FOR MORE DETIALS.
AT+WA=YOURSSID DEFINE ROUTER'S "SSID"
AT+NSTAT=? CURRENT WIRELESS AND NETWORK CONFIG. NOTE: Write down the reported IP address. you will need it later
AT+WSTATUS ADAPTER REPORTS THE CURRENT NETWORK CONFIG TO SERIAL HOST
AT+DNSLOOKUP=google.com TEST YOUR CONNECTION TO THE INTERNET. IF SUCCSESSFUL IT WILL RETURN GOOGLE'S IP ADDRESS
AT+NSTCP=5000 SET TCP SERVER AT PORT 5000
AT+NSUDP=4000 SET UDP SERVER AT PORT 4000
AT+CID=? RETURNS THE CURRENT CID CONFIGURATION
ATC1 SET TO AUTOCONNECT AT RESTART
AT&W0 SAVE SETTINGS TO PROFILE "0"
ATA CONNECT

Test Code

Once you have verified that your Shield is connected to the internet you can upload this sketch to your Arduino by simply removing the 2 jumpers, then replacing them once the sketch has been uploaded. There is no need to change the settings for this, so just replace them back on "USB" mode.

You can test WiFi communication with this shield by removing the USB cable and providing external power. It is recommended that you provide 7.5Vdc and 1A to ensure the Wifi Radio has enough power.

You should now be able to connect to your shield's IP address and the specified UDP port using PuTTy.

Pressing 1 and 0 should turn LED 13 on and off, while reporting back to you on the PuTTY screen.

void setup() {
  pinMode(13, OUTPUT);
  Serial.begin(115200);
  delay(100);
  Serial.println("Press any key to continue");
  while(Serial.available()==0);
  Serial.println("  Lets test the DFRobot WiFi Shield");
  Serial.println("Press 1 to light the LED, and 0 to turn it off");
  Serial.println("Entery: ");
  digitalWrite(13, HIGH);
}

void loop() {

  if (Serial.available()){

    char input = Serial.read();
    switch (input){
    case '1':
      digitalWrite(13, HIGH);
      Serial.println("ON");
      delay(500);
      break;
    case '0':
      digitalWrite(13, LOW);
      Serial.println("OFF");
      delay(500);
      break;
    }
  }
}

Version change log

V2.2 Improvements:

  1. Improve the reset button to reset the Arduino and wifi module at the same time
  2. GPIO29 disconnect the wifi network connection
  1. Run/Prog Communicate with the Wifi / Disconnect the TTL pins from Wifi for programming Arduino
  2. USB/Arduino Drive the wifi directly via USB communication / Drive the wifi module via Arduino TTL

DFshopping_car1.png Get WiFi Shield V2.2 For Arduino (SKU:TEL0047) from DFRobot Store or DFRobot Distributor.

Category: DFRobot > Internet of Things - IOT > IOT Device category: Product_Manual category: TEL_Series category: Wireless category: Shields

Turn to the Top