IRremote类库中涉及的Container for received IR codes

       在Arduino中对红外遥控的无线通信编程时,要用到decode_results结构,该结构的成员如下:



       假如定义了一个红外接收的类对象:IRrecv irrecv( 这里是红外一体化接收头连接到Arduino的引脚);

      又定义了 存储编码结果的对象:decode_results results;

      那么,对接收到的红外信息进行解码后,即:irrecv.decode(&results);

      就可以得到对象results的值。这些值得表示如下:

        results.decode_type: Will be one of the following: NEC, SONY, RC5, RC6, or UNKNOWN.
        results.value: The actual IR code (0 if type is UNKNOWN)
        results.bits: The number of bits used by this code
        results.rawbuf: An array of IR pulse times
        results.rawlen: The number of items stored in the array



你可能感兴趣的:(Arduino)