Poor maker’s Infrared receiver #2 - feedback
Posted: Mon Jun 12, 2017 11:38 pm
Wow, great bit of Arduino coding with your https://www.analysir.com/blog/2014/05/2 ... eceiver-2/ project. I got it working and just had a couple of comments/questions:
, +2308548516, +2308546340, +60, -1720, +4294965576, -2556, +44, -0, +64, -0, +4294967020, -300, +4294966996, -304, +4294966992, -292, +4294967004, -292, +4294967004, -304, +4294966992, -812, +52, -292, +4294967004, -812, +44, -1712, +36, -284, +4294967012, -848, +24, -276, +20, -272, +40, -300, +4294966996, -296, +4294967000, -1148, +4294966148, -280, +4294967016, -276, +4294967020, -540, +20, -300, +40, -296, +4294967000, -836, +48, -288, +4294967008, -840, +4294967000, -1696, +36, -816, +48, -316, +4294966980, -832, +4294967000, -828, +32, -816, +4294966988, -1728, +32, -828, +40, -816, +52, -1700, +52, -77644, +4294889652, -79816, +4294887480, -0, +40, -1684, +52, -0, +4294967008, -288, +4294967008, -316, +4294966980, -284, +24, -528, +28, -832, +36, -832, +32, -0, +4294966988, -816, +36, -832, +32, -820, +4294966996, -832, +48, -1684, +36, -812, +44, -824, +52, -816, +56, -292, +4294967004, -280, +44, -544, +4294966752, -832, +32, -1700, +36, -0, +4294966992, -856, +20, -804, +60, -292, +4294967004, -824, +44, -860, +20, -284, +4294967012, -848, +24, -304, +36, -840, +24, -1700, +36, -0, +4294966992, -300, +40, -844, +20, -288, +4294967008, -292, +4294967004, -832, +40, -1712, +4294967000, -828, +36, -1188, +4294966108, -170036
Modulation Period: 16500 (nano seconds)
Modulation Frequency: 60606 (Hz)
, +2307040684, +2307038508, +44, -1732, +4294965564, -2564, +44, -832, +24, -0, +4294967004, -292, +4294967004, -836, +24, -824, +56, -0, +4294967012, -820, +28, -816, +48, -836, +32, -508, +32, -292, +48, -848, +4294966448, -2536, +52, -292, +4294967004, -288, +52, -296, +4294967000, -828, +48, -832, +24, -304, +4294966992, -840, +24, -272, +20, -292, +4294967004, -824, +28, -284, +4294967012, -820, +48, -300, +4294966996, -836, +44, -804, +48, -288, +4294967008, -800, +52, -1732, +4294965564, -816, +48, -292, +4294967004, -844, +4294966988, -832, +4294967008, -1700, +24, -828, +40, -836, +4294966996, -1684, +40, -0, +32, -77668, +4294889628, -79844, +4294887452, -80708, +4294886588, -308, +4294966988, -816, +36, -840, +52, -0, +4294967000, -824, +32, -852, +20, -832, +32, -0, +40, -288, +4294967008, -812, +44, -844, +36, -828, +24, -828, +48, -1164, +4294966132, -836, +28, -296, +4294967000, -816, +60, -304, +4294966992, -832, +40, -288, +4294967008, -1176, +4294966120, -824, +52, -832, +24, -292, +4294967004, -296, +44, -308, +4294966988, -832, +36, -816, +48, -304, +4294966992, -828, +44, -1168, +4294966128, -312, +4294966984, -856, +24, -804, +44, -304, +4294966992, -832, +40, -1168, +20, -304, +4294966992, -820, +48, -1172, +4294966124, -171220
Modulation Period: 16937 (nano seconds)
Modulation Frequency: 59042 (Hz)
, +2305832356, +2305830184, +44, -1732, +4294965564, -2564, +44, -828, +40, -0, +4294966996, -812, +52, -808, +60, -832, +36, -812, +52, -800, +68, -0, +4294966992, -304, +4294966992, -864, +4294966432, -828, +4294966992, -1684, +40, -856, +4294966440, -804, +4294967008, -832, +4294966464, -308, +4294966988, -812, +44, -0, +32, -1176, +36, -304, +28, -296, +4294967000, -300, +4294966996, -296, +4294967000, -836, +36, -832, +32, -816, +48, -1176, +4294966120, -820, +60, -1156, +48, -800, +4294967004, -288, +4294967008, -1668, +48, -292, +4294967004, -852, +28, -1168, +4294966128, -828, +52, -0, +64, -1144, +4294966152, -0, +40, -77668, +4294889628, -79840, +4294887456, -80704, +4294886592, -308, +4294966988, -816, +36, -840, +52, -0, +4294967000, -824, +32, -852, +20, -832, +32, -0, +28, -288, +4294967008, -812, +44, -844, +36, -828, +24, -828, +48, -1160, +4294966136, -840, +28, -296, +4294967000, -816, +60, -304, +4294966992, -832, +40, -304, +4294966992, -1164, +4294966132, -824, +52, -832, +24, -292, +4294967004, -296, +44, -308, +4294966988, -832, +36, -816, +48, -304, +4294966992, -828, +44, -1164, +4294966132, -312, +4294966984, -856, +44, -804, +44, -828, +52, -320, +4294966976, -832, +40, -304, +4294966992, -820, +48, -1164, +4294966132, -168448
Modulation Period: 27625 (nano seconds)
Modulation Frequency: 36199 (Hz)
Thanks!
- I think there's a typo in sketch. This line refers to pin 2 but pin 0 is being used just after the open bracket:
Code: Select all
//default definition for ISR #define enableIRrx attachInterrupt(0, rxIR_Interrupt_Handler, FALLING) //set up interrupt handler for IR rx on pin 2 - demodulated signal
- You may want to mention that the serial monitor baud should be set to 115200, to match your Arduino sketch serial setting.
- I happened to have a photodiode with the black coating to filter most non-IR wavelengths and it works a lot better than the clear emitter. I ended up getting a range of 50cm using TV remote with new batteries!
- In the blog you state "this software will just report the signal timings on the serial port" - but when I look at the output, some results are negative and some really large. Can you explain what the numbers mean (example below)?
- Any idea how I'd convert the output into a HEX code?
, +2308548516, +2308546340, +60, -1720, +4294965576, -2556, +44, -0, +64, -0, +4294967020, -300, +4294966996, -304, +4294966992, -292, +4294967004, -292, +4294967004, -304, +4294966992, -812, +52, -292, +4294967004, -812, +44, -1712, +36, -284, +4294967012, -848, +24, -276, +20, -272, +40, -300, +4294966996, -296, +4294967000, -1148, +4294966148, -280, +4294967016, -276, +4294967020, -540, +20, -300, +40, -296, +4294967000, -836, +48, -288, +4294967008, -840, +4294967000, -1696, +36, -816, +48, -316, +4294966980, -832, +4294967000, -828, +32, -816, +4294966988, -1728, +32, -828, +40, -816, +52, -1700, +52, -77644, +4294889652, -79816, +4294887480, -0, +40, -1684, +52, -0, +4294967008, -288, +4294967008, -316, +4294966980, -284, +24, -528, +28, -832, +36, -832, +32, -0, +4294966988, -816, +36, -832, +32, -820, +4294966996, -832, +48, -1684, +36, -812, +44, -824, +52, -816, +56, -292, +4294967004, -280, +44, -544, +4294966752, -832, +32, -1700, +36, -0, +4294966992, -856, +20, -804, +60, -292, +4294967004, -824, +44, -860, +20, -284, +4294967012, -848, +24, -304, +36, -840, +24, -1700, +36, -0, +4294966992, -300, +40, -844, +20, -288, +4294967008, -292, +4294967004, -832, +40, -1712, +4294967000, -828, +36, -1188, +4294966108, -170036
Modulation Period: 16500 (nano seconds)
Modulation Frequency: 60606 (Hz)
, +2307040684, +2307038508, +44, -1732, +4294965564, -2564, +44, -832, +24, -0, +4294967004, -292, +4294967004, -836, +24, -824, +56, -0, +4294967012, -820, +28, -816, +48, -836, +32, -508, +32, -292, +48, -848, +4294966448, -2536, +52, -292, +4294967004, -288, +52, -296, +4294967000, -828, +48, -832, +24, -304, +4294966992, -840, +24, -272, +20, -292, +4294967004, -824, +28, -284, +4294967012, -820, +48, -300, +4294966996, -836, +44, -804, +48, -288, +4294967008, -800, +52, -1732, +4294965564, -816, +48, -292, +4294967004, -844, +4294966988, -832, +4294967008, -1700, +24, -828, +40, -836, +4294966996, -1684, +40, -0, +32, -77668, +4294889628, -79844, +4294887452, -80708, +4294886588, -308, +4294966988, -816, +36, -840, +52, -0, +4294967000, -824, +32, -852, +20, -832, +32, -0, +40, -288, +4294967008, -812, +44, -844, +36, -828, +24, -828, +48, -1164, +4294966132, -836, +28, -296, +4294967000, -816, +60, -304, +4294966992, -832, +40, -288, +4294967008, -1176, +4294966120, -824, +52, -832, +24, -292, +4294967004, -296, +44, -308, +4294966988, -832, +36, -816, +48, -304, +4294966992, -828, +44, -1168, +4294966128, -312, +4294966984, -856, +24, -804, +44, -304, +4294966992, -832, +40, -1168, +20, -304, +4294966992, -820, +48, -1172, +4294966124, -171220
Modulation Period: 16937 (nano seconds)
Modulation Frequency: 59042 (Hz)
, +2305832356, +2305830184, +44, -1732, +4294965564, -2564, +44, -828, +40, -0, +4294966996, -812, +52, -808, +60, -832, +36, -812, +52, -800, +68, -0, +4294966992, -304, +4294966992, -864, +4294966432, -828, +4294966992, -1684, +40, -856, +4294966440, -804, +4294967008, -832, +4294966464, -308, +4294966988, -812, +44, -0, +32, -1176, +36, -304, +28, -296, +4294967000, -300, +4294966996, -296, +4294967000, -836, +36, -832, +32, -816, +48, -1176, +4294966120, -820, +60, -1156, +48, -800, +4294967004, -288, +4294967008, -1668, +48, -292, +4294967004, -852, +28, -1168, +4294966128, -828, +52, -0, +64, -1144, +4294966152, -0, +40, -77668, +4294889628, -79840, +4294887456, -80704, +4294886592, -308, +4294966988, -816, +36, -840, +52, -0, +4294967000, -824, +32, -852, +20, -832, +32, -0, +28, -288, +4294967008, -812, +44, -844, +36, -828, +24, -828, +48, -1160, +4294966136, -840, +28, -296, +4294967000, -816, +60, -304, +4294966992, -832, +40, -304, +4294966992, -1164, +4294966132, -824, +52, -832, +24, -292, +4294967004, -296, +44, -308, +4294966988, -832, +36, -816, +48, -304, +4294966992, -828, +44, -1164, +4294966132, -312, +4294966984, -856, +44, -804, +44, -828, +52, -320, +4294966976, -832, +40, -304, +4294966992, -820, +48, -1164, +4294966132, -168448
Modulation Period: 27625 (nano seconds)
Modulation Frequency: 36199 (Hz)
Thanks!