Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: WiFi shield not present on: November 18, 2012, 04:57:56 pm
Solved the problem.
I had to connect ,in addition to the usb, a power cable of 9 V.
The usb was not supplying enough power on its own.
2  Using Arduino / Networking, Protocols, and Devices / WiFi shield not present on: November 18, 2012, 03:45:41 pm
I just bought the Arduino Wifi Shield. I've followed the setup instructions and uploaded their code but I get the error: "WiFi shield not present" . I use the Arduino Uno 2009. Not the newest R3 version, so I did the connection for the 3.3V. Why the code is not working?

Their code:
Code:
/*
 
 This example  prints the Wifi shield's MAC address, and
 scans for available Wifi networks using the Wifi shield.
 Every ten seconds, it scans again. It doesn't actually
 connect to any network, so no encryption scheme is specified.
 
 Circuit:
 * WiFi shield attached
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 21 Junn 2012
 by Tom Igoe and Jaymes Dec
 */


#include <SPI.h>
#include <WiFi.h>

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

  // Print WiFi MAC address:
  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 **");
  int numSsid = WiFi.scanNetworks();
  if (numSsid == -1)
  {
    Serial.println("Couldn't get a wifi connection");
    while(true);
  }

  // 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: ");
    printEncryptionType(WiFi.encryptionType(thisNet));
  }
}

void printEncryptionType(int thisType) {
  // read the encryption type and print out the name:
  switch (thisType) {
  case ENC_TYPE_WEP:
    Serial.println("WEP");
    break;
  case ENC_TYPE_TKIP:
    Serial.println("WPA");
    break;
  case ENC_TYPE_CCMP:
    Serial.println("WPA2");
    break;
  case ENC_TYPE_NONE:
    Serial.println("None");
    break;
  case ENC_TYPE_AUTO:
    Serial.println("Auto");
    break;
  }
}
3  Using Arduino / Programming Questions / Re: c#,c++,Perl, What is arduino's language? on: March 02, 2012, 08:47:42 pm
Then why isn't working when I try the simplest c++ program?
#include <iostream>
using namespace std;
int main()

{
 
  int x;
 
  cout<<"Please enter value";
  cin>>x;
 
 

return 0;
}
4  Using Arduino / Programming Questions / c#,c++,Perl, What is arduino's language? on: March 02, 2012, 07:48:14 pm
Hi,

Is there a book that shows how to program well and efficiently the arduino language like a c++ book?

Im learning c++, but what language is the arduino using? I cannot find any place that teaches how to learn the language in dept.

Please tell mehow the language works

Thank you
5  Using Arduino / Programming Questions / 1st years engineering C language general help on: February 08, 2012, 05:49:53 pm
Hi,

I'm taking my first class of c++, but I would like to know to implement this knowledge in the  arduino. I tried to create a project using C++ language ex : #include<iostream> .... but it doesnt work. I would like to know if any of you know what website or book can I get to easily be able to program the arduino from what I learn from C++ ( like arrays, classes, pointers...).

What library is the arduino using? cplusplus.com is a nice website but I cant find the same for c.

I would really appreciate to help/knowledge.

Thank you!
Pages: [1]