I'm hacking my garage door opener and need a little assistance on the sketch to use a 433MHz RF transmitter to send the correct code to open the door
My opener has 2 buttons. Each button has a series of 10 dip switches that I can set to change the transmitted code. I've already captured the transmitted code and can calculate any code based on the dip switches
The code is 5 bytes long and each switch controls half a byte. code for ON is 1110 and code for OFF is 1000.
I know the exact freq is 466.975MHz and each cycle is 0.5ms and one button produces a 1 wave length per cycle and the other button produces 4 wave lengths per cycle.
As an example:
DIP: ON OFF ON OFF ON OFF ON ON OFF OFF
BIN: 1110 1000 1110 1000 1110 1000 1110 1110 1000 1000
HEX: 0xE 0x8 0xE 0x8 0xE 0x8 0xE 0xE 0x8 0x8
CODE: 0xE8, 0xE8, 0xE8, 0xEE, 0x88
I am using an Arduino Nano Every and have a 433Mhz Transmitter with 3 pins (data, 5v, GND).
I setup an Arduino UNO as a test receiver with the matching 433MHz receiver with 4 pins.
So this is where I'm running into an issue:
I've tried using the "01_send" example sketch from rf433send (https://www.arduinolibraries.info/libraries/rf433send)
I can get it to transmit/send with all the example
byte data[] = { 0x03, 0x14, 0x15, 0x93 };
If I add a byte to the array I get an error: "rf433send.cpp:166: assertion failed, aborted."
byte data[] = { 0x03, 0x14, 0x15, 0x93, 0x16 }; // error
Secondly I've tried using the RadioHead Library (http://www.airspayce.com/mikem/arduino/RadioHead) "ask_transmitter" example
sketch. It throws an error when loaded on the Nano Every but does not throw an error if i try to load onto the UNO. I'm assuming this library does not Nano Every compatible. I want the transmitter to be on the Nano Every due to size
"Error compiling for board Arduino Nano Every."
The solution I'm looking for will transmit 5 bytes at 433.975MHz with a cycle of 0.5ms on an Arduino Nano Every.
Code 1 will have 1 wave length per cycle
Code 2 will transmit at 4 wavelengths per cycle
Here is an example of the signal