Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868A-4 RF433MHz decoding.
#11
(05-10-2024, 10:56 PM)admin Wrote: A4 RF433M receiver pin is IO13, here is code:
Code:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(13));
  Serial.print("begin test");
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}

As per ESP 32 WROOM-32E Electrical diagram ( See Attachment) the RF 433Mhz pin INput shoul be IO19, The IO13 shoul be used for Temperature sensor 1. In any case I tried the  above code , but still nothyng appen


Attached Files
.pdf   a.pdf (Size: 105.2 KB / Downloads: 120)
Reply
#12
take a photo of your A4 PCB board, i want to see the version of PCB. your posted photo, can't see whole PCB.
Reply
#13
(05-13-2024, 11:42 AM)admin Wrote: take a photo of your A4 PCB board, i want to see the version of PCB. your posted photo, can't see whole PCB.

Here is a PCB picture  As per ESP32WROM -32E pin 19 shoulb assigne as a MISO (Master Input / Slave Output)


Attached Files Image(s)
       
Reply
#14
i have tested with these code is work well. RF 433M receiver pin : GPIO19
   
   
   
   
make sure you have installed "RC Switch" library.
[Image: attachment.php?aid=541]
if also can't work, maybe need change another 433M receiver for a testing.

this code work well:
Code:
/*
  Simple example for receiving
 
  https://github.com/sui77/rc-switch/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(19));
  Serial.print("begin test");
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}
Reply
#15
(05-14-2024, 01:10 AM)admin Wrote: i have tested with these code is work well. RF 433M receiver pin : GPIO19




make sure you have installed "RC Switch" library.
[Image: attachment.php?aid=541]
if also can't work, maybe need change another 433M receiver for a testing.

this code work well:
Code:
/*
  Simple example for receiving
 
  https://github.com/sui77/rc-switch/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(19));
  Serial.print("begin test");
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}

The Code You Used is the same to the code I'm using. I tested the code with 2 different receivers . With same waveform output, who I posted previously. For this reason I say that is the KC868-A4 get a problem, does not read the IO19
Reply
#16
ok, can you weld the GPIO19 pin on ESP32? make a good contact.
if really can't work with gpio19, you can cut the line, connect to other free gpio.
when you bought the board? which onlline store URL you have bought?
Reply
#17
(05-14-2024, 10:35 PM)admin Wrote: ok, can you weld the GPIO19 pin on ESP32? make a good contact.
if really can't work with gpio19, you can cut the line, connect to other free gpio.
when you bought the board? which onlline store URL you have bought?

Can you tell Me whitch one free GPIO I can use to make a test?

I purchased board on 19 March 2023 to aliexpress "ZiJun Automatic Store" URL https://it.aliexpress.com/store/5648007?...J2DKJ2DKnt.
Reply
#18
if you don't use the IR receiver, you can remove it. the IR reciever use by GPIO23 of ESP32.
you can cut pcb line GPIO19 connect to U8 chip. then connect U8 output line to esp32 GPIO23 directly.
   
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)