IR(NEC) address [] data [] what are the expected values?



  • I have some IR codes I would like to transmit via M5StickC (appreciate M5StickC is transmit only)
    0x00F720DF = Red
    0x00F7A05F = Green
    0x00F7609F = Blue
    And more in format like https://tasmota.github.io/docs/Codes-for-IR-Remotes/#ir-codes-tv-lg-55uh8509
    I am assuming these are the data values to go in the UIFlow block.

    The documentation: https://docs.m5stack.com/en/mpy/hardwares/ir is not clear and could do with an example.

    I've tried the https://flow.m5stack.com/?examples=ir_nec_sender_demo example with the above codes in data and the below codes for address
    0x10 = 16-bit (from NEC docs the address half the full datagram length)
    0x01 = 8-bit (the address length itself)
    0x08 = the inverse of the inverse bits (inverse of F7)

    I've taken the codes above to be 32 bit. I've tried in run and download modes then tested still no luck.

    I'm aware of the following instruction, but I really think it should be possible from UIFlow for this simple set.
    https://github.com/Sarah-C/M5Stack_Atom_IRSendLEDLightDemo/tree/main

    I have tested and confirmed IR is on (webcam test). Any help please, I would like to do without Arduino because I think it should, well, just work.



  • Hi I tried many times with the IR unit and uiflow, I think the uiflow can do nothing with IR unit.

    What I get is the IR unit can only receive what it send out, you can write some very simple python codes to validate this, if you have connected the controller with serial,

    ir_0 = unit.get(unit.IR_NEC, unit.PORTA)
    ir_0.rx_cb(lambda d,a,c: print("recv:",d,a,c))
    
    # same with ir.tx(123,456)
    ir_0.tx(123,456)
    

    You should get the output something like that, "recv: 255 123 0", you can try to hide the transmitter or receiver light for a while if you don't get the "recv", and try another times.

    I think the implementation for rx_cb is quiet simple and it can not be used for parse the output of any remotes, I'm trying to learn something Arduino or the .Net, don't touch uiflow any more.