PaulS:
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 :
#include <WiServer.h>
#include <Servo.h>
int val=5;
String appo="";
#define WIRELESS_MODE_INFRA 1
#define WIRELESS_MODE_ADHOC 2
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
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#