Library to read 433MHz codes with decoder HT6P20
Dependents: Gateway_Cotosys Gateway_Cotosys_os5
Revision 1:adf26c4f20cd, committed 2019-06-11
- Comitter:
- Thrillex13
- Date:
- Tue Jun 11 00:23:55 2019 +0000
- Parent:
- 0:bcd4927f951a
- Commit message:
- Initial. Library to read 433MHz RF transmitters with decoder HT6P20
Changed in this revision
RFDecoder.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r bcd4927f951a -r adf26c4f20cd RFDecoder.cpp --- a/RFDecoder.cpp Sun Jun 02 19:56:03 2019 +0000 +++ b/RFDecoder.cpp Tue Jun 11 00:23:55 2019 +0000 @@ -45,18 +45,9 @@ if (!startbit) { // Check the PILOT CODE until START BIT; dur0 = _rx.read_low_us(); -/* - if(dur0>50){ - addressFull = dur0; - return true; - }else{ - return false; - } -} -*/ - //If time at "0" is between 5359 us (23 cycles of 233us) and 9959 us (23 cycles of 433 us). - if((dur0 > 5000) && (dur0 < 13000) && !startbit){ + //If time at "0" is between 9200 us (23 cycles of 400us) and 13800 us (23 cycles of 600 us). + if((dur0 > 9200) && (dur0 < 13800) && !startbit){ //calculate wave length - lambda lambda_RX = (dur0 / 23);