milaq / rpi-rf

Sending and receiving 433MHz signals with cheap GPIO RF modules on a Raspberry Pi
BSD 3-Clause "New" or "Revised" License
504 stars 179 forks source link

receive codes seem incorrect #32

Open hacktorious opened 6 years ago

hacktorious commented 6 years ago

Hello, I'm new to rpi-rf and RF. I am trying to figure out how to print out the correct codes. Perhaps I just don't understand how to use the library.

Here is what I am sending: python3.6 rpi-rf_send.py 2048 -p 771 -t 5

Here are some of the responses I am getting: 2018-08-22 17:54:36 - [INFO] rpi-rf_receive: 6 [pulselength 770, protocol 5] 2018-08-22 17:54:36 - [INFO] rpi-rf_receive: 1 [pulselength 805, protocol 5] 2018-08-22 17:54:40 - [INFO] rpi-rf_receive: 64 [pulselength 1963, protocol 4]

Why is the receive displaying different random responses than what I am sending?

I would like to be able to do something like this on the receive side: if code == 123: do something elif code == 456: do something else else: do something amazing

I haven't quite figured out how to get "code" on the receiving end.

Thanks.