sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.9k stars 658 forks source link

how to send a simple ( on off modulation ) in stream binary #365

Closed juankr10s closed 3 years ago

juankr10s commented 3 years ago

hi community i need send a simple on off serial binary stream without protocols only on off in a time secuence is posible in rc-switch?

juankr10s commented 3 years ago

i try edit protocol :

{ 300, { 1, 1 }, { 0, 1 }, { 1, 0 } }, // protocol 5 but bit "0" is 96us more long than "1" Screenshot_20201010_225656

zoneamick commented 3 years ago

as a simple question do you use a 315mhz transmitter?

juankr10s commented 3 years ago

hi no, 434Mhz (rf module 433mhz)

1technophile commented 3 years ago

without protocols

It is not possible without a protocol, the protocol defines the signal modulation and demodulation.

But you can stick with protocol 1 and consider a decimal value 1234567 as ON and a decimal value 7654321 as OFF.

juankr10s commented 3 years ago

mmm ok i think in a loop with delay (ms) on off gpio port for rf 433 module well thank you

1technophile commented 3 years ago

There is also other protocols that support ON OFF like the one below: https://github.com/sui77/rc-switch/blob/master/examples/TypeA_WithDIPSwitches/TypeA_WithDIPSwitches.ino if you don't want to reinvent the wheel.

i think in a loop with delay (ms) on off gpio port for rf 433 module

Be careful about not jamming the 433mhz frequency