Can't find HC-12 module

Hello, I have an Arduino UNO connected to an HC-12 bluetooth module like this:

The goal is to communicate between RPi3 and the Arduino with bluetooth.
I'm running it with this code:

#include <SoftwareSerial.h>

char data = 0;            //Variable for storing received data
void setup()
{
    Serial.begin(9600);   //Sets the baud for serial data transmission                             
    pinMode(13, OUTPUT);  //Sets digital pin 13 as output pin

}
void loop()
{
   if(Serial.available() > 0)      // Send data only when you receive data:
   {
      data = Serial.read();        //Read the incoming data & store into data
      Serial.print(data);          //Print Value inside data in Serial monitor
      Serial.print("\n");        
      if(data == '1')              // Checks whether value of data is equal to 1
         digitalWrite(13, HIGH);   //If value is 1 then LED turns ON
      else if(data == '0')         //  Checks whether value of data is equal to 0
         digitalWrite(13, LOW);    //If value is 0 then LED turns OFF
   }
}

The problem is I can't find my HC12 module with my Android or my Raspberry PI.
Any help would be apreciated! :slight_smile:

Your code is either junk, or it is incomplete - or possibly both. You have called for Software serial but you are not using it.

Your procedure to use Android is probably very different to that for Raspberry Pi. I assume Raspberry doesn't have a master bluetooth built-in and you need another like that on Arduino, and they both need to be configured to talk to each other. Have you done that? Bluetooth does/should not need to be configured to talk to Android. Can Android see it when the power is connected?

I suggest you leave Raspberry out of the game until you know what you are doing.

All of the above assumes that your "HC-12 bluetooth module" is indeed a bluetooth module, and I'm not sure about that. If in fact it isn't, I guess that goes quite some way to explain why Android cannot see it.

Any help would be apreciated!

It may be unrealistic to expect the Arduino to power the bluetooth module, especially from the 3.3V pin. Which module do you have?

Some resellers claim HC-12 is Bluetooth but in fact, it's NOT. So that's logical you can't see it on Android.
If you want to control a "robot" (eg) at long distance, you have to build 2 devices: one for the robot with the HC-12 and a second one, near the Android, which have a HC-12 (so receving data from the robot) and a HC-05 (which is a real Bluetooth module) to communicate with the Android.

PedroStil:
The goal is to communicate between RPi3 and the Arduino with bluetooth.

As others have said, the HC-12 is not a Bluetooth module.

Dont know if they are avaialble on all the ISM bands, but my HC-12s are on 433Mhz.

PedroStil:
The problem is I can't find my HC12 module with my Android or my Raspberry PI.

I normally use a torch. And it is usually in the rear left corner of the third drawer. Under the box of screws.

...R

Hi,
Welcome to the forum.
If you look at the title of the article you got the diagram and read the article, it will tell you what you have,

www.14core.com/wiring-the-hc11-hc12-434433mhz-transceiver/

Tom... :slight_smile: