wireless water level dispaly (with HC-12 and LCD)

to start with i’m new to Arduino and coding

i’ve set up a Water tank level measurement using SR04 ultrasonic module and LCD display.
i want to upgrade this to a wireless one with 2 HC-12 modules. please let me know the codes to be added to Transmitter side Arduino and the Receiver side Arduino.


Can we see the code you have please and what model Arduino are you using?
How are you powering the remote unit and how far between Tx and Rx?

Have you googled arduino HC-12

Thanks.. Tom.. :slight_smile:

the code is as follows

#include <LiquidCrystal_I2C.h> //Lcd library

#define I2C_ADDR 0x27 //or(0x3F) I2C adress, you should use the code to scan the adress first (0x27) here
#define BACKLIGHT_PIN 3 // Declaring LCD Pins
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7

#define TRIG 11 //Module pins
#define ECHO 12

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup() {

pinMode(TRIG, OUTPUT); // Initializing Trigger Output and Echo Input
lcd.begin (16,2);
lcd.setBacklight(HIGH); //Lighting backlight
lcd.home ();

void loop() {

digitalWrite(TRIG, LOW); // Set the trigger pin to low for 2uS

digitalWrite(TRIG, HIGH); // Send a 10uS high to trigger ranging

digitalWrite(TRIG, LOW); // Send pin low again
float distance = pulseIn(ECHO, HIGH,26000); // Read in times pulse

distance = distance/58;//Convert the pulse duration to distance
//You can add other math functions to calibrate it well


Now using Uno for wired one. for the wireless setup- one Uno and one Mega. for testing powering by 2 batteries. distance is around 20m. yes i have 2 HC-12 modules and tested LED dimming wirelessly.


Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

I hope you're using rechargeable batteries for the transmitter node as otherwise it's going to be expensive, fast...

yes i have 2 HC-12 modules and tested LED dimming wirelessly.


If you have been able to dim an LED using controller and HC-12, then you should know how to transmit data from your ultrasonic unit.
Can you post your LED dim codes please?
Using code tags.
Tom... :slight_smile: