---
title: "NORVI AGENT 1-BM02-ES-L – USER GUIDE"
description: "## **Programming**  The NORVI AGENT 1-BM02-ES-L has a mini USB port for serial connection with the SoC for programming. Any ESP32-supported programming IDE can be used to program the controller. Follow this Guide to programming NORVI ESP32-based controllers with the…"
url: "https://norvi.io/docs/norvi-agent-1-bm02-es-l-user-guide/"
updated: "2026-03-30"
category: "OTHER PRODUCTS / NORVI AGENT1 LoRa / NORVI AGENT 1-BM02-ES-L"
---

# NORVI AGENT 1-BM02-ES-L – USER GUIDE

## **Programming** 

The NORVI AGENT 1-BM02-ES-L has a mini USB port for serial connection with the SoC for programming. Any ESP32-supported programming IDE can be used to program the controller. Follow this Guide to programming NORVI ESP32-based controllers with the Arduino IDE.

SoC: ESP32-WROVER-B           
Programming Port: USB UART

## **Digital Inputs** 

#### **Wiring Digital Inputs**

The digital inputs of NORVI AGENT 1-BM02-ES-L can be configured as both sink and source connections. The inverse of the Digital Input polarity should be supplied to the common terminal.

![](https://norvi.io/wp-content/uploads/2024/09/11-3.jpg)
NORVI AGENT 1-BM02-ES-L Digital Input Wiring

### **Programming Digital Inputs**** **

Reading the relevant GPIO of the ESP32 gives the value of the Digital Input. When the inputs are in the OFF state, the GPIO goes HIGH, and when the input is in the ON state, the GPIO goes LOW. Refer to the GPIO allocation table in the datasheet for the digital input GPIO.

```cpp

                #define INPUT1 27

void setup() {
   Serial.begin(115200);
   Serial.println("Device Starting");
   pinMode(INPUT1, INPUT);
}

void loop() {
   Serial.print(digitalRead(INPUT1));
   Serial.println("");
   delay(500);
}
```

## **4 - 20 mA Analog Input**

#### **Wiring Analog Inputs** 

![](https://norvi.io/wp-content/uploads/2024/09/14-3.jpg)
NORVI AGENT 1-BM02-ES-L Analog Input Wiring

![](https://norvi.io/wp-content/uploads/2024/09/4-20-wiring-12-1024x526.jpg)

#### **Reading Analog Input**

Reading the relevant I2C address of the ADC gives the value of the Analog Input.

![](https://norvi.io/wp-content/uploads/2024/09/4-20-READING-1-9.jpg)

### **Programming Analog Inputs **

```cpp

                #include <Adafruit_ADS1X15.h>
#include <Wire.h>
Adafruit_ADS1115 ads1;

void setup() {
   Serial.begin(115200);
   Serial.println("Device Starting");
   Wire.begin(21,22);
   ads1.begin(0x48);
   ads1.setGain(GAIN_ONE);
}

void loop() {
  Serial.print("Analog 0 ");
  Serial.println(ads1.readADC_SingleEnded(0));
  delay(10);
  Serial.print("Analog 1 ");
  Serial.println(ads1.readADC_SingleEnded(1));
  delay(10);
  Serial.print("Analog 2 ");
  Serial.println(ads1.readADC_SingleEnded(2));
  delay(10);
  Serial.println("");
  delay(500);
}
```

## **RS-485 Communication**

![](https://norvi.io/wp-content/uploads/2024/09/RS485-WIRING-1-1024x448-9.jpg)

| Driver | MAX485 |
| --- | --- |
| UART RX | GPIO23 |
| UART TX | GPIO13 |
| Flow Control | GPIO32 |

GPIO Connections of RS-485

#### **Programming RS-485**

The RS-485 connection of the NORVI AGENT 1-BM series uses

```cpp

                #define RXD 23
#define TXD 13
#define FC 32

void setup() {
  Serial.begin(9600);
  pinMode(FC, OUTPUT);
  Serial1.begin(9600, SERIAL_8N1,RXD,TXD);
}

void loop() {
  digitalWrite(FC, HIGH); // Make FLOW CONTROL pin HIGH
  Serial1.println("RS485 01 SUCCESS"); // Send RS485 SUCCESS serially
  delay(500); // Wait for transmission of data
  digitalWrite(FC, LOW); // Receiving mode ON

  while (Serial1.available()) { // Check if data is available
    char c = Serial1.read(); // Read data from RS485
    Serial.write(c); // Print data on serial monitor
  }
  delay(1000);
}
```

### **Built-in Buttons**

| Button 1 Pin |   Digital Input GPIO35 |
| --- | --- |

GPIO Connection of buttons

#### **Programming Buttons**

```cpp

                #define buttonPin 35
int  buttonState = 0;

void setup() {
  Serial.begin(9600);
  pinMode(buttonPin,INPUT);
}

void loop() {
  Serial.print("Button: ");
  buttonState = analogRead(buttonPin);
  delay(50);
  Serial.print(analogRead(buttonPin));
  Serial.print("tAnalog: ");
  delay(1000);
}
```

## **LoRaWAN**

| Specification | Long Range(LoRa) |
| --- | --- |
| RF Transceiver | RFM95W-915S2 |
| bit Rate | Up to 300 kbps |
| Link Budget | +20 dBm - 100 mW |
| RF sensitivity | -148 dBm |
| SPI MISO | GPIO19 |
| SPI MOSI | GPIO23 |
| SPI SCK | GPIO18 |
| NSS | GPIO2 |
| DIO0 | GPIO4 |
| DIO1 | GPIO15 |
| DIO2 | NOT CONNECTED |
| RESET | GPIO5 |

### **USB and Reset**

![](https://norvi.io/wp-content/uploads/2024/09/4-5-6.jpg)
