Linksprite Cuhead WIFI Shield (HCARDU0069)

Post Reply
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Linksprite Cuhead WIFI Shield (HCARDU0069)

Post by admin » Tue Apr 16, 2013 9:01 pm

Image

[img]http://www.hobbycomponents.comHCARDU0069_2_800.jpg[/img]

Image
Arduino board not included.

Description:
CuHead WiFi shield Version has the EEPROM that can be used to store webpages; it also has the battery charging components populated.
This is the shield you need to get Wi-Fi connectivity to your Arduino-based project! This shield provides 802.11b connectivity and is a direct drop-on plug-and-play solution to your Arduino Diecimila/Duemilanove/Uno R2/3.

The second revision of this board has all the components in surface mount form. The new and exciting feature of the second revision of this board is the addition of a 16Mbit serial flash for storing web pages and other data! This additional storage space can be used for storing more complex and feature rich webpages, as well as sensor type data to be downloaded at a future time.


Shield Features:

• Add-on shield built for Arduino Diecimila, Duemilanove and Uno R2/R3
Dimensions, shape, and even colour match exactly!
True plug-n-play solution
• Uses SPI for host communication (max speed 25MHz)
• All Arduino headers brought out for easy access
• Easy access reset button on-board
• On-board PCB antenna
• Switchable interrupt pin usage between INT0 and digital pin 8
• Switchable LED on digital pin 9
• Switchable CS pin for serial flash between digital pin 10 and digital pin 7[1]


Wi-Fi Module Features:

• 802.11b Wi-Fi certified
1Mbps and 2Mbps throughput speeds
• Supports both infrastructure (BSS) and ad hoc (IBSS) wireless networks
• Ability to create secured and unsecured networks
WEP (64-bit and 128-bit)
WPA/WPA2 (TKIP and AES) PSK
• Low power usage
Sleep mode: 250μA
Transmit: 230mA
Receive: 85mA


Pin Usage:

• SPI
o Slave select (SS) : Arduino pin 10 (port B, pin 2)
o Clock (SCK) : Arduino pin 13 (port B, pin 5)
o Master in, slave out (MISO) : Arduino pin 12 (port B, pin 4)
o Master out, slave in (MOSI) : Arduino pin 11 (port B, pin 3)
• Interrupt (Uses only one of the following, depending on jumper setting)
o INT0 : Arduino pin 2 (port D, pin 2)
o DIG8 : Arduino pin 8 (port B, pin 0)
• LED : Arduino pin 9 (port B, pin 1)
o To regain use of this pin, remove the LED jumper cap
• 5V power
• GND

If you set up the serial dataflash CS pin to use pin 10, then the WiFi module will not be usable. In order to use the dataflash and WiFi concurrently, the dataflash jumper CS pin must be set to pin 7.

Order Yours Here.


Schematic:
Image


Example Arduino Sketch:

Code: Select all

/* FILE:    ARD_WiFi_Shield_HCARDU0069
   DATE:    16/04/13
   VERSION: 0.1

This is an example of how to use the Hobby Components LinkSprite cuHead
WiFi shield (HCARDU0069). To use this shield you will need to download 
and add the appropriate library to your Arduino IDE from either the 
LinkSprite website or our own support forum at
http://forum.hobbycomponents.com

This sketch will serve a basic webpage at the ip address specified
below. As an example of content, the webpage contains the current status 
of the 6 analogue input pins.

To use this example sketch you will need to change the local_ip, gateway_ip,
subnet_mask, ssid, security_type, and security_passphrase or wep_key.


You may copy, alter and reuse this code in any way you like but please leave
reference to hobbycomponents.com in your comments. This software may not be
used directly for the purpose of selling products that directly compete with
Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS LTD MAKES NO WARRANTIES, 
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY 
OR LACK OF NEGLIGENCE. HOBBY COMPONENTS LTD SHALL NOT, IN ANY CIRCUMSTANCES, 
BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL
OR CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
*/


/* Include the WiFi server library */
#include <WiServer.h>

/* Wireless mode types. Use infrastructure if connecting to a router */
#define WIRELESS_MODE_INFRA	1
#define WIRELESS_MODE_ADHOC	2

/* The IP address that you wish to access the shield at. This must be 
   on the same subnet as your network */
unsigned char local_ip[] = {192,168,1,55};

/* Your networks gateway address */
unsigned char gateway_ip[] = {192,168,1,1};

/* Your networks subnet mask */
unsigned char subnet_mask[] = {255,255,255,0};

/* Your networks SSID */
const prog_char ssid[] PROGMEM = {"YOURSSID"};

/* Your networks security type (0 = NONE, 1 = WEP, 2 = WPA, 3 = WPA2) */
unsigned char security_type = 3;

/* Your pass phrase if using WPA or WPA2 encryption. */ 
const prog_char security_passphrase[] PROGMEM = {"yourpassword"};	

/* Your 128 bit WEP key if using WEP encryption instead */
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,	// Key 0
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 1
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 2
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	// Key 3
				};


/* In this example we are connecting to a wireless access point, 
   therefore we will use infrastructure mode */
unsigned char wireless_mode = WIRELESS_MODE_INFRA;

unsigned char ssid_len;
unsigned char security_passphrase_len;

/* Loop counter used for reading the 6 analogue inputs */
int k;



void setup() {
  /* Initiliase the webserver and set it to serve our example webpage function 
     whenever a page is requested */
  WiServer.init(ExampleWepage);
  
  /* Enable serial  verbose mode for debugging */
  Serial.begin(57600);
  WiServer.enableVerboseMode(true);
}

/* Main program */
void loop(){

  /* Keep running the webserver task to constantly check for a requested page */
  WiServer.server_task();
 
  /* Wait a little */
  delay(10);
}


/* Example webpage function. Returns TRUE of page served ok */
boolean ExampleWepage(char* URL) {
  
  /* Was the requested URL "/" ? */
  if (strcmp(URL, "/") == 0) {
  /* If it was then we can now send a response to the client’s http request... */

    /* ...and add some useful content by reading the 6 
       analogue inputs and returning their status */
          
    WiServer.print("<body>");
    WiServer.print("<big><span style=\"font-weight: bold;\">www.hobbycomponents.com Ethernet Shield Example</span></big><br>");
    WiServer.print("****************************************************<br>");
          
    for (k = 0; k < 6; k++)
    {
      WiServer.print("Analogue input ");
      WiServer.print(k);
      WiServer.print(": ");
      WiServer.print(analogRead(k));
      WiServer.print("<br>");
    }
          
    WiServer.print("****************************************************<br>");
    WiServer.print("</body>");
        
        
    /* Page served ok so return true */
    return true;
  }
  /* Unknown URL so return false */
  return false;
}
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Arduino Shields”