Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By gerardwr
#23712 I just tested the Arduino code in the URL below on my ESP8266 to control 433 Mhz Power Switches and it works without any changes. I tested the following switches and confirm they work OK.
- Blokker RF Switches
- Kaku (old) RF Switch
- Kaku (new) RF Switch

The library also supports the following RF switches but I have not tested those:
- Action/Impuls RF Switches
- Elro RF Switches.

The library also contains code for the reception of 433 Mhz RF Remotes. I did not test this (yet).

Thanks to the creator @fuzzilogic.

URL : https://bitbucket.org/fuzzillogic/433mh ... /wiki/Home
User avatar
By rvtk
#23896 I tried the fuzzilogic code for the reception of 433 mhz rf remotes. I didn't get the example ShowReceivedCode (RemoteSwitch) to work. I used 3.3V as input voltage for the 433 receiver, it seems to work as I attached a led to the data_out pin and pressing the remote does lit up the led, otherwise it flickers randomly. But I didn't get any received signal in my serial window.

In the past I was successful with the code and an Arduino Nano. One difference between the sending code and the receiving code is that the receiving code uses interrupts, I am not sure if they are functioning the same as a Nano.
User avatar
By gerardwr
#23947
rvtk wrote:I tried the fuzzilogic code for the reception of 433 mhz rf remotes. I didn't get the example ShowReceivedCode (RemoteSwitch) to work.


Same result here, did not work for me either. Attached my RF receiver to ESP8266-GPIO2 and changed the sketch accordingly.

rvtk wrote:In the past I was successful with the code and an Arduino Nano. One difference between the sending code and the receiving code is that the receiving code uses interrupts, I am not sure if they are functioning the same as a Nano.

I have my own interrupt-driven code running on a "real" Arduino. Loaded this sketch to the ESP, changed interrupt pin to 2 (for GPIO2) and it "almost" works. I receive data from RF receiver but the pulstrain is not interpreted correctly. I assume this is caused by the fact that the micros() function is not very accurate due to other processes running on the ESP. I read somewhere here to use an SDK call for getting a CPU timer, but fail to find it again. Anyone remember this post?
User avatar
By rvtk
#23959
gerardwr wrote:I read somewhere here to use an SDK call for getting a CPU timer, but fail to find it again. Anyone remember this post?

I found the following on https://github.com/esp8266/Arduino/blob ... ference.md:
Code: Select allESP.getCycleCount() returns the cpu instruction cycle count since start as an unsigned 32-bit. This is useful for accurate timing of very short actions like bit banging.

Does that help?