'WiFiClient' does not name a type; did you mean 'DNSClient'

Hi all, I have been trying this for some time and I am not sure what happened to me with this error (WiFiClient does not name a type).

error: 'WiFiClient' does not name a type; did you mean 'DNSClient'?
WiFiClient client;Preformatted text

I am using ESP8266.

What are the libraries that you included?

For goodness sake !
Please post your full sketch and error message

I am a new user here, it doesn't allow me to attach file.
I had uploaded the full sketch, error message and the ESP8266 library to my google drive for your reference.

https://drive.google.com/drive/folders/1zR1hVYaSvYhP7lQsjuA1VTrnv1sAZEgw?usp=share_link

I have included the SerialESP8266 which I'm not sure is it correct, i got it from online.
This is my first time working on arduino.

You may refer to my google drive for all my files uploaded. (Full sketch, error message and the library used)
https://drive.google.com/drive/folders/1zR1hVYaSvYhP7lQsjuA1VTrnv1sAZEgw?usp=share_link

I'm a new user, it doesnt allow me to attach file here.

I used the SerialESP8266 library.

A couple of points :

  • it is better to post a file here rather than attach it
  • getting the ability to attach a file is not hard

To post images etc you need trust level 1, you can get there by:

  • Entering at least 5 topics
  • Reading at least 30 posts
  • Spend a total of 10 minutes reading posts

Users at trust level 1 can…

  • Use all core Discourse functions; all new user restrictions are removed
  • Send PMs
  • Upload images and attachments

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project.

Thanks for trying to use code tags. Next time replace preformatted text by the error messsge :wink:

Start with one of the example programs:

File -> Examples -> ESP8266WiFi -> WiFiClient
or
File -> Examples -> ESP8266WiFi -> WiFiClientBasic

That will show you what #include lines you need and how to use the libraries.

1 Like

IOT_RFID_Arduino.ino (2.4 KB)
IOT_RFID_NodeMCU.ino (2.6 KB)

These are my full sketch

I connected the Arduino same as this diagram. Not sure if it's correct.
Appreciate if I can get some help from the experts.
image

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.