Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: wifishield error on: December 15, 2012, 02:54:24 pm
We need to start at the bottom and work up. If you have the official WiFi shield, you need to use the WiFi library (WiFiClient and WiFiServer), not the Wi library (WiServer and WiClient).

Even if you fix the well documented errors in the Wi library, it will NOT work with the WiFi shield hardware.
yes i know that ,
but can you help me please ,
i used webserver example and connected to the network ,,,, but i want to use the ip in web browser to control it ,
or if you know any way to control it using ip
2  Using Arduino / Programming Questions / Re: wifishield error on: December 15, 2012, 10:36:28 am
Code:

MacchininoV1.cpp.o: In function `loop':
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:47: undefined reference to `WiServer'
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:47: undefined reference to `WiServer'
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:47: undefined reference to `Server::server_task()'
MacchininoV1.cpp.o: In function `setup':
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:40: undefined reference to `WiServer'
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:40: undefined reference to `WiServer'
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:40: undefined reference to `Server::init(unsigned char (*)(char*))'
C:\Users\TheRedLion\Desktop\arduino-1.0.3/MacchininoV1.ino:42: undefined reference to `Server::enableVerboseMode(unsigned char)'
I got this after putting in the library
3  Using Arduino / Programming Questions / Re: wifishield error on: December 15, 2012, 10:12:47 am
Quote
yes i use wifishield but the code is for wisheild
First, you didn't post the code that you are having problems with.

Second, you didn't say anything about having downloaded the library that it is complaining about.

Third, you can't use code for one wifi shield with another wifi shield. Forget that. Use the library that goes with your hardware.
sorry , here is the code :
Code:
#include <WiServer.h>
#include <Servo.h>
int val=5;
String appo="";

#define WIRELESS_MODE_INFRA
#define WIRELESS_MODE_ADHOC

unsigned char local_ip[] = {192, 168, 1, 2};      // Indirizzo IP
unsigned char gateway_ip[] = {192, 168, 1, 245};     // Indirizzo gateway IP
unsigned char subnet_mask[] = {255, 255, 255, 0};   // Subnet Mask
const prog_char ssid[] PROGMEM = {"Technicolor"};     // SSID access point

unsigned char security_type = 1;

const prog_char security_passphrase[] PROGMEM = {"test"};

prog_uchar wep_keys[] PROGMEM = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

unsigned char wireless_mode = WIRELESS_MODE_INFRA;

unsigned char ssid_len;
unsigned char security_passphrase_len;

Servo Direzione;
Servo Accelerazione;
int time;

void setup() {

  Direzione.attach(14);
  Accelerazione.attach(15);
 
  time=millis();
 
  WiServer.init (Gestione_Richieste_Web);
 // Serial.begin (9600);
  WiServer.enableVerboseMode (false);
}


void loop() {
  WiServer.server_task();
}

boolean Gestione_Richieste_Web (char* URL) {
   
 //  Serial.println("vediamo url:");
 //   Serial.println(URL);
   
    char Acc=URL[1];
    char Dir=URL[2];

    if (Acc=='c')  Accelerazione.write(1500);
    if (Dir=='c')   Direzione.write(97);
     
     if(Acc=='w')
     {
       if((time+250) < millis())
       {
         Accelerazione.write(2000);
         //time=millis();
       }
       //delay(250);     
     }
     else if(Acc=='s')
     {
        if((time+250) < millis())
       {
         Accelerazione.write(1300);
         //time=millis();
       }
       //delay(250);     
     }
     
     if(Dir=='a')
     {
       Direzione.write(67);   
     }
     else if(Dir=='d')
     {
       Direzione.write(127);     
     } 
   
    return (true);
}


,,,2nd :

this what happened when i used wishield library
Code:


In file included from MacchininoV1.ino:2:
C:\Users\TheRedLion\Desktop\arduino-1.0.3\libraries\WiShield/WiServer.h:198: error: conflicting return type specified for 'virtual void Server::write(uint8_t)'
C:\Users\TheRedLion\Desktop\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'




3rd: no , what i want is just connecting the pc with wifishield
and use external application to control the car with some commands
like c#

4  Using Arduino / Programming Questions / wifishield error on: December 15, 2012, 09:51:53 am
hi ,
i am trying to make a command for wifi shield to make it control the arduino uno on wireless server
and i got an error looks like this :
Code:
MacchininoV1.ino: In function 'void setup()':
MacchininoV1:40: error: 'WiServer' was not declared in this scope
MacchininoV1.ino: In function 'void loop()':
MacchininoV1:47: error: 'WiServer' was not declared in this scope

yes i use wifishield but the code is for wisheild
5  Using Arduino / Programming Questions / Re: make a network by wifi shield on: December 13, 2012, 03:48:29 pm
see i made a program that can control a wired arduino , but what i want is wireless , so i want to make my wireless shield as a wireless network , so my pc can connect to it , and send commands to it or program it
6  Using Arduino / Programming Questions / make a network by wifi shield on: December 13, 2012, 02:58:26 pm
hi ,
i want to make the wifi shield as a router , make a network , and with this network i can control it by visual basic
if anyone have idea please tell me  smiley-red
7  Using Arduino / Programming Questions / Re: key pressing on: December 12, 2012, 12:42:20 pm
is there any way to control the arduino chip from the pc by using keyboard?
8  Using Arduino / Programming Questions / key pressing on: December 12, 2012, 12:28:00 pm
hi ,
 
i want to know if i can make this thing
..
is there a code , when i press the key (from keyboard) it change the  INPUT PULLUP to high , when i release the key it change it to low ?

 smiley-sweat
Pages: [1]