🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Lesson 3. Wi-Fi. Scanner

    Lessons and Guides
    2
    4
    22.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DimiD
      Dimi
      last edited by Dimi

      This lesson focuses on the built-in Wi-Fi. We will learn how to search for available wireless networks and see signal strength.

      Step 1. Check out some of the functions to work with Wi-Fi ESP32 in list 1;

      List1. Functions for working with built-in buttons

      • Wi-Fi access.mode(WIFI_STA); Sets the operation mode of the wireless adapter in client mode
      • Wi-Fi access.disconnect(); Terminates the wireless connection
      • Wi-Fi access.scanNetworks(); Scans the list of available wireless networks and returns their number
      • Wi-Fi access.RSSI(i); Returns the signal level of the wireless network with the serial number i
      • Wi-Fi access.SSID(i); Returns the name of the wireless network with the serial number i

      Step 2. Create a new sketch in the Arduino IDE. Select New on the File menu, (Fig. 1);

      alt text
      Figure 1. Create a new sketch

      Step 3. Please note that for the built in wireless Wi-Fi module you have to connect the library "Wi-Fi.h". We will write the code (Fig. 2 - 2.4);

      alt text
      Figure 2. Sketch. Page 1

      alt text
      Figure 2.1. Sketch. Page 2

      alt text
      Figure 2.2. Sketch. Page 3

      alt text
      Figure 2.3. Sketch. Page 4

      alt text
      Figure 2.4. Sketch. Page 5

      Step 4. Click the Upload button (Fig. 3) in order to flash the device;

      alt text
      Figure 3. Download the firmware to the device

      Step 5. When the device firmware is completed, on the device screen will appear the name of our lesson and the signature button, clicking on which the device searches for networks (Fig. 4, 4.1).

      alt text
      Figure 4. Main menu

      alt text
      Figure 4.1. Available wireless networks

      1 Reply Last reply Reply Quote 0
      • JJJ
        JJ
        last edited by

        Hi Dimi,
        Can you make this one available for download too please?

        DimiD 1 Reply Last reply Reply Quote 0
        • DimiD
          Dimi @JJ
          last edited by

          @jimit hi! you can download https://yadi.sk/d/azY94lkf3RkRei

          JJJ 1 Reply Last reply Reply Quote 1
          • JJJ
            JJ @Dimi
            last edited by

            @dimi
            Hi, thanks Dimi.
            Downloaded... flashed to unit... works well !! Cheers.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post