Go Down

Topic: "WiFi does not name a type" error for Arduino Yun  (Read 326 times) previous topic - next topic

rcvolley

I'm having trouble with this code the library was built into the Arduino so I didn't have to upload it myself I have no access to the folder its in its hidden from me and I have no idea how to get to it but I assume its set up correctly because the Arduino came with it and I have been having trouble finding a forum that can help me because most say to either move the folder its in or to make sure its installed correctly.

this is my code

Code: [Select]

#include <TextFinder.h>
#include <Bridge.h>
#include <WiFi.h>
#include <WiFiServer.h>
WiFiClient client; //Creates a client that can connect to to a specified internet IP address and port as defined in client.connect().

//client.connect("192.168.240.1/sd/serial")// it looks like you have to have an if else statement to go with this

WiFi.begin("Arduino Yun-90A2DAF50109","arduino")//starts the librarys prosses

void setup() {

  // put your setup code here, to run once:
  //if statement must be with in either set up or loop

if(client.connect("192.168.240.1/sd/serial")){
  Console.println("conected");}

else {
  Console.println("not conected")}
}


wifi.begin() is the line that is highlighted in red when I compile it

rcvolley

I figured it out it turns out that you have to put the WiFi.begin() under the void setup() otherwise you get this error

Go Up