/* 1byte HC12 TRANSMITTER example.
/* Tutorial link: http://electronoobs.com/eng_arduino_tut96.php
 * Code: http://electronoobs.com/eng_arduino_tut96_code1.php
 * Scheamtic: http://electronoobs.com/eng_arduino_tut96_sch1.php
 * Youtube Channel: http://www.youtube/c/electronoobs   
 * 
  Module   ->   Arduino UNO/NANO    
    GND    ->   GND
    Vcc    ->   3.3V ok 5v if not constant TX
    Tx     ->   6
    RX     ->   7       
 */
#include <SoftwareSerial.h>
SoftwareSerial HC12(6, 7); //6=HC-12 TX Pin, 7=HC-12 RX Pin

void setup() {
 // Serial.begin(9600);   // Serial port to computer
  HC12.begin(9600);     // Serial port to HC12
}
void loop() {  
  byte anything=7;
  HC12.write(anything);   // Send  number 7    data to HC-12 
  //Hc12.write   sends one byte (not chr)
  //HC12.print   or HC12.println sends string as chr
  delay(1000);
      digitalWrite(13,HIGH);
      delay(10); //confirm led
      digitalWrite(13,LOW); 
}

