MACアドレスフィルタリングしている 2.4GHz Wifi に繋げたい場合、以下のようなコードを用意して一度焼いて確認する必要がある。サンプルコードに手を入れただけなので、GitHubに登録するまでもないか…

 

  1. #include <M5Unified.h>
  2. #include <WiFi.h>
  3.  
  4. void setup() {
  5.  
  6.   auto cfg = M5.config();
  7.   M5.begin(cfg);
  8.  
  9.   M5.Display.setTextSize(3);
  10.  
  11.   // Show MacAddress
  12.   WiFi.begin();
  13.   char macAdr[24];
  14.   byte mac[6];
  15.   WiFi.macAddress(mac);
  16.   sprintf(macAdr, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
  17.   M5.Lcd.println(macAdr);
  18.  
  19. }
  20.  
  21. void loop() {
  22.  
  23.   delay(1000);
  24.  
  25. }