Does not accumulate Kuibu not even thousands of miles, does not accumulate the small flow not to become jianghai.
code download available on GitHub < portal >.
HS0038 Infrared receiver Head, the internal integration of monitoring, amplification, filtering, demodulation and a series of circuit processing output baseband signal.
In fact HS0038 and vs1838b no difference, just compared to 0038 better performance.
The original signal is that we want to send a data "0" bit or a data "1" bit, and the so-called 38K carrier is the frequency of 38K square wave signal, modulated signal is the final waveform we send out. We use the original signal to control the 38K carrier, when the signal is the data "0" when the 38K carrier is completely out of order to send out, when the signal is the data "1", do not send any carrier signal.
To let hs0038b recognize the 38K infrared signal, then this 38K carrier must be greater than 10 cycles, which limits the infrared communication baseband signal must not be higher than 3800 bit rate, that if the serial output signal directly with 38K modulation, the baud rate can not be higher than 3800.
But the more commonly used infrared communication protocol--NEC protocol.
The data format of the NEC protocol includes the boot code, user code, user code (or user code inverse code), key code and key code anti-code, and the last stop bit.
Boot code: 9MS Carrier +4.5ms Idle.
Bit value "0": 560us of Carrier +560US Idle.
Bit value "1": 560us of Carrier +1.68ms Idle.
HS0038B This infrared integrated receiver head, when receiving a carrier signal, will output a low level, idle time will be output high level.
The logic of the program is not difficult, difficult is difficult in the coding.
Practice more.
Practice more.
Practice more.