"Wifi not found" error using a Uno R3 and a wifi shield R3

Hi,

I just registered on Blynk and I’m trying to register using an arduino uno R3 and a wifi shield R3. Using the given code with the arduino online code editor I get a “wifi not found” error. However I am sure of the ssid and the pass I’m using.

The code :

/*************************************************************

  This is a simple demo of sending and receiving some data.
  Be sure to check out other examples!
 *************************************************************/

/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID           "TMPL5-c8n2yGM"
#define BLYNK_TEMPLATE_NAME         "Quickstart Template"
#define BLYNK_AUTH_TOKEN            "xxxxxxxxxxxxxxxx"

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <SPI.h>
//#include <WiFi101.h>
include <WiFi.h>
// #include <BlynkSimpleWiFiShield101.h>
#include <BlynkSimpleWiFiShield.h>


// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "STRONG_75c9_2.4GHz";      // your network SSID (name)
char pass[] = "*******";              // your network password

BlynkTimer timer;

//WiFiServer server(50000);

// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
  // Set incoming value from pin V0 to a variable
  int value = param.asInt();

  // Update state
  Blynk.virtualWrite(V1, value);
}

// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
  // Change Web Link Button message to "Congratulations!"
  Blynk.setProperty(V3, "offImageUrl", "*****://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
  Blynk.setProperty(V3, "onImageUrl",  "*****://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
  Blynk.setProperty(V3, "url", "*****://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}

// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, millis() / 1000);
}

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
  // You can also specify server:
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);

  // Setup a function to be called every second
  timer.setInterval(1000L, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly. Triple backticks look like this: ```

WiFi101 library is not for “WiFi Shield R3”.
The right library is “WiFi” (the first Arduino WiFi library)

Thanck you.

I tried :

#include <SPI.h>
//#include <WiFi101.h>
#include <WiFi.h>
//#include <BlynkSimpleWiFiShield101.h>
#include <BlynkSimpleWiFiShield.h>

And obtain this error message “BlynkSimpleWiFiShield.h: No such file or directory”.

The problem is that I’m not able to find BlynkSimpleWiFiShield library.

What board type are you choosing in the IDE when you compile this code?

Pete.

it is BlynkSimpleWiFi.h

BlynkSimpleWiFi.h is a library, not the name of the board you have selected in your ide board manager

Arduino Uno.

Which seems normal since the code is injected into a uno card in which a wifi shield is plugged.

I tried “Arduino Uno Wifi” but it didn’t work, wich seam normal too.

I searched but couldn’t find this library in the library manager or the net. Do you know where to find it ?

It’s part of the Blynk library.
If you have the latest (1.2.0) version of the library installed correctly then it will already be installed.

As you’ve realised, using the QuickStart template and choosing “Arduino” as your board type doesn’t work in most cases, mostly because there are way too many different flavours of Arduino boards with lots of different WiFi connection options.

You’d be better using the Sketch Builder (link at the top of the page) to generate your code, or doing the sensible thing and ditching the prehistoric hardware and using an ESP8266 or ESP32 instead.

Pete.

The blynk 1.2.0 library is installed but Blynk Simple WiFi.h is still not found. This whether I take “Arduino uno” or “Arduino uno wifi” as board type.

The capitalisation is incorrect.
It should be BlynkSimpleWifi.h

Pete.

Ok Pete, thanck you, I didn’t know library names are case sensitive. This time it works.

So much time lost … I hope arduino will put a "check capitalisation (…) " into their error messages one time !

Everything is case-sensitive in C++ ( and most other programming languages too) including variable names, object names, function names and library names.

Pete.

Hummm … I must have gotten into a bad habit of programming with Delphi and VB then !