-->
Page 3 of 3

Re: Finding localMAC on SparkFun WiFi Shield/Arduino

PostPosted: Tue Jun 06, 2017 11:36 pm
by Johnd2117
Once again thank you for you help. This is the code I used :
Code: Select allint retMac = esp8266.localMAC(myMAC);
   if (retMac > 0)
   {
      Serial.print("My MAC address is: ");
      Serial.print(myMAC[0], HEX);
      Serial.print(":");
      Serial.print(myMAC[1], HEX);
      Serial.print(":");
      Serial.print(myMAC[2], HEX);
      Serial.print(":");
      Serial.print(myMAC[3], HEX);
      Serial.print(":");
      Serial.print(myMAC[4], HEX);
      Serial.print(":");
      Serial.println(myMAC[6], HEX);
   }


and it works perfectly. I now could enclose the Serial.print statements a for next loop, I'll look t that once I've got my head around some other stuff. : :lol: