ACSSR and Atom Matrix in UIFlow over I2C



  • Hello @ajb2k3

    ok, thank you for explaining.

    Just thought about this: make sure your ACSSR still uses the default I2C address, e.g. 0x50. (just in case you've changed it in the past.)

    Thanks
    Felix



  • Hello @ajb2k3

    just for fun. Below the UIFlow2 alpha-28 blocks (non dedicated) to switch the ACSSR via MQTT using an M5AtomS3.

    Note: in Loop the Execute code block containing mqtt_client.check_msg() is required to get subscribed MQTT messages in a non blocking way. Please see this thread.

    0_1701782279283_UI2_ATOMS3_ACSSR_20231205.png

    Thanks
    Felix



  • @felmue oh cool thanks may have to try that with my M5Dial project



  • @felmue Can you record a video and upload to YouTube?
    I tried but still cant get it to connect as the red LED flashes for a few seconds then goes out.



  • Hello @ajb2k3

    sorry, I do not have the equipment for a video nor a YouTube account.

    The RGB LED is supposed to flash (I think about 6 times) then goes out. (Sorry if I wasn't clear about that.) BTW: The ACSSR does have a separate RED LED as well which will indicate its state.

    Please try my first UIFlow1 example (which does not include MQTT). This should help to figure out the I2C part.

    If the ACSSR still doesn't react I suggest you try to scan the I2C bus to make sure the ACSSR is seen and to figure out what I2C address the ACSSR currently is using. The default I2C address is 0x50, but maybe you've changed it in the past?

    Thanks
    Felix



  • Hello @ajb2k3

    you can use these blocks in UIFlow2 with M5AtomS3 to scan the I2C bus. If the ACSSR is recognized the result of the scan should be [80] which is decimal for 0x50.

    0_1701813788363_UI2_M5AtomS3_I2CExtScan_20231205.png

    Thanks
    Felix



  • Ok got it to scan and respond now



  • OK my brain is failed but how are you adding the 0x01 as I cant find a block to type it in?



  • Hello @ajb2k3

    yes, that is a tricky one - see post #10.

    You'll need to first create an empty bytearray variable with length 1 (I named it myByteArr), then set the first element to 0x01 (or 0x00), then you can use it with the i2c0 write buf... block.

    Thanks
    Felix



  • Hi, I have the Dial (in UIFLOW2) now talking to the home IOT server now thanks to your help, Just need to sort out some server side issues.
    I can get the ACSSR to work with the UIFLOW 1 blocks with the core and core2 but the atom just doesn't want to work.