Closed kawapiki closed 2 years ago
Hello
I indeed wrote the RF433send library. RF433send can be found here: https://github.com/sebmillet/rf433send (and you find it in Arduino library manager, too)
Inside RF433any, 01_main.ino example output is meant to be used by the RF433recv library. But you can adjust it for RF433send, it'll be straightforward. Indeed the magic number constants are different and you need to provide a few more elements, but besides, signal characteristics are represented with the same logic.
For example, when executing RF433any' 01_main.ino example, if having the below output: Waiting for signal Data: 8a 34 e6 bf
-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
RFMOD_TRIBIT, // mod
7056, // initseq
0, // lo_prefix
0, // hi_prefix
0, // first_lo_ign
580, // lo_short
1274, // lo_long
0, // hi_short (0 => take lo_short)
0, // hi_long (0 => take lo_long)
520, // lo_last
7056, // sep
32 // nb_bits
);
-----CODE END-----
Then, the object capable of emitting the same signal using RF433send would be created like this:
tx = rfsend_builder(
RfSendEncoding::TRIBIT,
PIN_RFOUT,
RFSEND_DEFAULT_CONVENTION,
5, // Number of repetitions
nullptr,
7056, // initseq
0, // lo_prefix
0, // hi_prefix
0, // first_lo_ign
580, // lo_short
1274, // lo_long
0, // hi_short
0, // hi_long
520, // lo_last
7056, // sep
32 // nb_bits
);
Above, you must define PIN_RFOUT with the PIN number where your TX device is plugged on the Arduino. As you can see rfsend_builder has some other additional arguments (as compared to RF433any' 01_main.ino output). Among other things you set a fixed number of repetitions when emitting signal, or instead you can use a callback function to keep emitting signal until a condition is met (useful if you rely on a button being pushed) ; see RF433send documentation. Above, I put 5 and no callback, so the signal is simply emitted 5 times, period.
Hope it helps,
Regards, Seb
thank You, sry missed checking your full repos list just 6 featured shown. Now its works as excepted!
I've got a question, how i can retransmit/mimic the received data, do you have transmitter lib, or any advice?
Thanks your honest work! Csaba