Arduino Uno + Wifi Shield Tinyos

Greetings people,

I was trying not to create a new topic but i did not found my solution in my searches.

Well im trying to build a wifi robot with a camera. I made my tests already on the car, making him make his moves previously programed in the arduino board, but the problem is the wifi shield.

I bought a Tinyos wifi shield WizFi210. I already configured it to connect to my home wifi automatically whenever it is turned on. I connected to it using Putty and received info from Arduino IDE serial monitor. It seems as well that it does not need the arduino to tell where to connect and other details as it does it auto.

I just wanted you guys to share with me a code where i could test the robot moving it by the internet, so that i could move it thru my web browser. I guess i need to build an interface but i just dont know a simple way to do it and fast as its just for testing.

Im sorry if im making you guys waste your time but im just stuck in this and dont know where to start or how to start this wifi comunication.

Thanks in advance and good luck on your projects! :wink:

Well i made some more searches after my head had time to refresh and what i want is to do some webduino coding. I downloaded a example sketch “Hello World” but im having an error in compiling.

Heres the code:

/* Web_HelloWorld.pde - very simple Webduino example */

#include “SPI.h”
#include “Ethernet.h”
#include “WebServer.h”

/* CHANGE THIS TO YOUR OWN UNIQUE VALUE. The MAC number should be

  • different from any other devices on your network or you’ll have
  • problems receiving packets. */
    static uint8_t mac = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

/* CHANGE THIS TO MATCH YOUR HOST NETWORK. Most home networks are in

  • the 192.168.0.XXX or 192.168.1.XXX subrange. Pick an address
  • that’s not in use and isn’t going to be automatically allocated by
  • DHCP from your router. */
    static uint8_t ip = { 192, 168, 1, 210 };

/* This creates an instance of the webserver. By specifying a prefix

  • of “”, all pages will be at the root of the server. */
    #define PREFIX “”
    WebServer webserver(PREFIX, 80);

/* commands are functions that get called by the webserver framework

  • they can read any posted data from client, and they output to the
  • server to send data back to the web browser. */
    void helloCmd(WebServer &server, WebServer::ConnectionType type, char , bool)
    {
    /
    this line sends the standard “we’re all OK” headers back to the
    browser */
    server.httpSuccess();

/* if we’re handling a GET or POST, we can output our data here.
For a HEAD request, we just stop after outputting headers. /
if (type != WebServer::HEAD)
{
/
this defines some HTML text in read-only memory aka PROGMEM.

  • This is needed to avoid having the string copied to our limited
  • amount of RAM. */
    P(helloMsg) = “

    Hello, World!

    ”;

/* this is a special form of print that outputs from PROGMEM */
server.printP(helloMsg);
}
}

void setup()
{
/* initialize the Ethernet adapter */
Ethernet.begin(mac, ip);

/* setup our default command that will be run when the user accesses

  • the root page on the server */
    webserver.setDefaultCommand(&helloCmd);

/* run the same command if you try to load /index.html, a common

  • default page name */
    webserver.addCommand(“index.html”, &helloCmd);

/* start the webserver */
webserver.begin();
}

void loop()
{
char buff[64];
int len = 64;

/* process incoming connections one at a time forever */
webserver.processConnection(buff, &len);
}

The sketch problem when compiling is “Webserver not declared”, it stops in the line where it says: WebServer webserver(PREFIX, 80); can anyone help me fixing this please?

Thanks in advance

When I compile your code I get the same errors you do, starting with this one:

sketch_apr08a.ino:5:23: error: WebServer.h: No such file or directory

Why do you think that one is not important?

Well because it doesnt gives me that error. I just wanted to find an example sketch where i could control my arduino uno through internet via web browser, and i found that one, and when compiling it gives me that error that i havent yet managed to fix. Do you have any sample code that would do something like that? Like a web page with some buttons or something?

Thanks for your time.

What version of the IDE are you using? What OS?

Have you downloaded the WebServer library? Where did you install it?

Im using Arduino IDE 1.05 r2 with windows 7 64-bit.

Uh, sorry for my ignorance but download it to where? I just copied the code and pasted on arduino IDE, i thought he would do the rest without anything else.

Sorry im still a bit noobie in arduino.

I just copied the code and pasted on arduino IDE, i thought he would do the rest without anything else.

Clearly not. Copied the code from where?

From github.com

From github.com

OK. Fine. Good luck resolving your issue.

(That's only slightly less vague than replying "from the internet")

Sorry, you are right, i just thought you would knew what i was saying. I copied from here:

If you go up a few levels, to:

There is a link to download the library that you are missing.

In your sketch folder, you should have a libraries directory. If not, create one. Unzip the file there, and rename the resulting directory to remove the -master from the name.

Ok PaulS, im going to do that and see if i can correct this problem.

Many thanks for your time really =)

Hey PaulS, you rule man! It seems that the problem was solved!

It was just simply importing the library as you said and then started it on Arduino IDE, open sketch and compile. ITS DONE!

Now im going to test this on hardware. Many thanks for your help!