Not able to specify (IP of Local) server

Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\kartiksingh00013\Documents\Arduino\New_WIFI_code\New_WIFI_code.ino: In function 'void setup()':

New_WIFI_code:25: error: 'IPAddress' was not declared in this scope

   Blynk.begin(auth, wifi, ssid, pass, IPAddress(192, 168, 1, 100),  8442);

                                                                 ^

exit status 1
'IPAddress' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Just use “182.168.1.100” and don’t bother with the IPAddress data type.

1 Like

Thanks for your help, but I also wanted to know which IPAddres I need to define and how to find it

@kartik13 if you have access to your router you should be able to find the IP of your local Blynk server in there.

You can also use Windows 10 networking tools to find the IP.

You mean that we need to specify the nework,s IPAdress to which I am connected

No the IP of the server but most routers show the IP’s of all connected devices.

A quick Google of “Windows 10 IP address” should also give you what you need.

Ok, I am able to find the IPAddres . but some people says that you need your pc,s public ip

Are you using the local server locally or externally?

If externally then you will need to set up port forwarding and use the public IP.

For most people it’s just way easier to use Blynk’s server if you are not working locally.

i am using the server locally

Then you just need you local IP and don’t need port forwarding.

Just to clarify, needing to use the public IP is not so much for the MCU ← Home Network → Local Server link , as both are generally used “locally” :wink: and yes there can be exceptions, but the need for the public address of your router, and port forwarding, will be determined by whether your App is used locally (in range of your local WiFi) or not (mobile connection).

So MCU uses local IP of Local Server, while App needs to point to same, or possibly to the the Public IP of your router, which is then the port forwarded to your Local Server IP.