Pages: [1]   Go Down
Author Topic: WiFi Shield & BOE Bot  (Read 409 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys!

First off, I would like to apologize if I put this in the wrong area.

To start, I'm trying to control my Parallax BOE Bot over Wi-Fi using the WiFi shield.  I am using the Arduino Uno Rev 2 as my microcontroller.  I am also using a TP-Link portable Router.  I am testing the WiFi Shield on the BOE shield to make sure it can see the router.  I put a jumper wire from 3.3V pin to the IOREF pin that's suggested for previous boards below Rev 3, and also because the BOE Shield doesn't have an IOREF. I am just using this code to scan for networks which is given on the Arduino WiFi Shield guide page.
Code:
#include <SPI.h>
#include <WiFi.h>

void setup() {
  // initialize serial and wait for the port to open:
  Serial.begin(9600);
  while(!Serial) ;

  // attempt to connect using WEP encryption:
  Serial.println("Initializing Wifi...");
  printMacAddress();

  // scan for existing networks:
  Serial.println("Scanning available networks...");
  listNetworks();
}

void loop() {
  delay(10000);
  // scan for existing networks:
  Serial.println("Scanning available networks...");
  listNetworks();
}

void printMacAddress() {
  // the MAC address of your Wifi shield
  byte mac[6];                   

  // print your MAC address:
  WiFi.macAddress(mac);
  Serial.print("MAC: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
}

void listNetworks() {
  // scan for nearby networks:
  Serial.println("** Scan Networks **");
  byte numSsid = WiFi.scanNetworks();

  // print the list of networks seen:
  Serial.print("number of available networks:");
  Serial.println(numSsid);

  // print the network number and name for each network found:
  for (int thisNet = 0; thisNet<numSsid; thisNet++) {
    Serial.print(thisNet);
    Serial.print(") ");
    Serial.print(WiFi.SSID(thisNet));
    Serial.print("\tSignal: ");
    Serial.print(WiFi.RSSI(thisNet));
    Serial.print(" dBm");
    Serial.print("\tEncryption: ");
    Serial.println(WiFi.encryptionType(thisNet));
  }
}

However, when it runs it doesn't pick up any of the available networks.  As a matter of fact, and this is where I think the issue is, it doesn't obtain a MAC address.  When using the WiFi shield with both the Arduino Uno Rev 2 and Rev 3 without the BOE Shield it obtains a MAC address and finds the networks.  I know there is an updated version of the firmware for the shield but I upgraded to it yet.  The motors on the BOE are attached to pins 11 and 12 (was on 12 and 13).

Another thing I noticed is that the L9 LED doesn't light up on the WiFi shield when plugged in.  Maybe it's not getting enough power to it?  I'm not totally sure and was wondering if someone could suggest something to try.

TL;DR  My WiFi shield, when plugged into the BOE shield and uses the ScanNetworks code, does not obtain a mac address and can't "see" any networks.

Thanks in advance,
Aceofsquares


P.S. If anyone would like me to post pictures of it just ask.  I tried to explain in as much detail as I could so I wouldn't have to but if it helps I will.
Logged

Pages: [1]   Go Up
Jump to: