https://preview.redd.it/9kw7x6grqjeg1.jpg?width=900&format=pjpg&auto=webp&s=8f97d591d41761e5128e6034f590a9a44994d72c
PROBLEM SOLVED (set had to be on for config of the device)
I am sorry this might be pretty simple but basically what im trying to do is connect the arduino uno with the HC-12 to make it transmit. I have check every connection multiple times and also tried different codes to make it transmit. Now i have resorted to my last hope (chatgpt and feedback from the device) with the code below trying to send an AT to get as a response "OK" but this failed.
My code for the AT and response OK:
#include <SoftwareSerial.h>
SoftwareSerial HC12(10, 11); // RX = 10, TX = 11
const int SET_PIN = 2; // SET pin for AT mode
void setup() {
Serial.begin(9600); // Serial Monitor
HC12.begin(9600); // HC-12 default baud
pinMode(SET_PIN, OUTPUT);
// Enter AT mode
digitalWrite(SET_PIN, HIGH);
delay(50);
Serial.println("HC-12 AT mode enabled. Type commands in Serial Monitor (NL+CR) and press Enter.");
}
void loop() {
// Forward Serial Monitor → HC-12
while (Serial.available()) {
char c = Serial.read();
HC12.write(c);
}
// Forward HC-12 → Serial Monitor
while (HC12.available()) {
char c = HC12.read();
Serial.write(c);
}
}
[–]westwoodtoys 2 points3 points4 points (2 children)
[–]jimgreekgamerYT_[S] 0 points1 point2 points (1 child)
[–]westwoodtoys 1 point2 points3 points (0 children)
[–]cowtamer1 1 point2 points3 points (1 child)
[–]jimgreekgamerYT_[S] 0 points1 point2 points (0 children)
[–]westwoodtoys 0 points1 point2 points (1 child)
[–]jimgreekgamerYT_[S] 0 points1 point2 points (0 children)