question sur nodemcu8266 / arduino

site WIFI selon une liste de SITE connu.

struct netw { char *MXWifi;/*ssid*/ char *YYYZY; /*passwd*/ const char *MyIp; /*ip adress*/ struct netw *next; };

struct netw prem = {"AAACCCCCC","xvdfgghs","192,168,1,32"}; struct netw seco = {"Orange-aa","XyZyQR","192,168,0,32"};

struct netw *current;

dans setup()

IPAddress local_IP(MYIpad); IPAddress gateway(MYGatew);

DoConnect();

dans void Doconnect() {

while(1) { Serial.println(current->MXWifi); Serial.println(current->YYYZY); Serial.println(current->MyIp);

// IPAddress local_IP(current->MyIp); Serial.println("-------------------");

if (current->next != &prem) { current = current->next; } else { current = &prem; break; }

}

La compilation ne veut pas de l'adresse ip.

Reply to
zeneca
Loading thread data ...

Bah il faut essayer de replacer les ',' par des '.' dans les

tTh

--
+------------------------------------------------------------------+ 
|                           https://framalibre.org/content/tetalab | 
 Click to see the full signature
Reply to
tTh

ceci est ok:

#define MYIpad 192,168,0,32 mais

IPAddress local_IP(MYIpad);

tout comme String ?? Typiquement Arduino??

Reply to
zeneca

Bonjour,

#include

#define MYIpad 192,168,0,1 #define MYGatew 192,168,0,255

et en corrigeant qq typos (ex : Doconnect/DoConnect)

Bon courage, L.

Reply to
laurent

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.