CMIS-1 Test Code Wifi


CMIS (Current Monitor IoT Sensors), SDK Kit is based on an Espressif ESP32 WROOM, which incorporated 2.4GHz Wireless.

This code simply communicates with the 2.4GHz Wireless and scans for available Access Point or Router networks.

Example Arduino code below.

Dave Williams, DitroniX 2019-2022 (
CMIS-1 Current Monitor IoT Sensors v1.0
Features include ESP32 MODBUS EEPROM CT Clamp Multi-Current Voltage
PCA v1.00 – Test Code Firmware v1 – 2nd September 2022
Simplified Board Bring Up Test – Wifi Scan
– Set the BOARD to ESP32 DEV Module (or similar).
– You can also set the BAUD rate up to 921600 to speed up flashing.
– The SDK does NOT need external power to flash. It will take Power from the USB 5V.
Note that in the default state, upon first power up and during reset, the Green LED will be partially lit.� Once programmed and the GPIO defined, the Green LED will go off after power up.
The purpose of this test code is to cycle through the various main functions of the board as part of bring up testing.
This test code is OPEN SOURCE and although is is not intended for real world use, it may be freely used, or modified as needed.
It is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

#include <WiFi.h>

WiFiClient client; // Initialize the client library

void setup() {

// Stabalise

// Initialize UART:
Serial.begin(115200, SERIAL_8N1); //115200
while (!Serial);

// Set WiFi to station mode and disconnect from an AP if it was previously connected

void loop() {

Serial.println(“ESP32 WiFi MAC \t ” + WiFi.macAddress());
Serial.println(“Scanning for Access Points or Routers. Please wait….”);

// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanNetworks();
Serial.print(“Scan Complete. “);
if (n == 0) {
Serial.println(“No Access Points or Routers Found.”);
} else {
Serial.println(” Access Points or Routers Found.”);

for (int i = 0; i < n; ++i) {
// Print SSID and RSSI for each network found
Serial.print(i + 1);
Serial.print(“: \t”);
Serial.print(” (“);
Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? ” ” : “*”);


Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.

Cart Summary (Discounts shown at checkout)

    Product Price Quantity Subtotal

Basket totals

Subtotal £0.00
Total £0.00