HC-12 programming

  1. I don't understand what you mean by "digital mode of a pin that you are using as an analog pin."

Then you should be starting with a MUCH simpler project. Some pins are digital only. Some pins are analog pins that share space with a digital pin.

You need to set the mode of digital pins. You do not need to set the mode of analog pins, which are input only.

2.I don't understand what you mean by "On EVERY pass through loop(), wait for a new value. Not the best approach."

What don't you understand? On EVERY pass through loop(), you call a blocking function, which waits for serial data to arrive. You COULD check whether there is serial data to read, and not block unless there is some (maybe not complete) data to read.

3.I don't understand what you mean by "You haven't stuck your head in the sand for long enough already?"

Perhaps you would if the delay() function was properly named - stickYourHeadInTheSandForAWhile().

4."Sharing the sending end data would be useful." do you mean to send the values received back to the transmitter ?

No. I mean sharing the serial monitor output with us.

  1. Actually i made the HC-12 module like a mount on where the pin 8 and 9 are connected to the positive and negative ends. Pin 11 and 12 are the transmitting and receiving part of the pin.

That's clear. As mud. Draw a schematic and post it. No more hand-waving.

And just to clarify if you think there is any problem with the setup or the board. I tried other programs like sending text from one side to another and onn and off a led wirelessly.

And you are keeping the results of those tests secret.

I'm wondering if you really do want help.