I2C communication Raspberry with Waveshare Triac HAT - not working with node-red-contribute-i2c (i2c out)

Hi,

I have connected a Wavshare Triac HAT to my RPi4 with which I want to communicate by I2C to control an AC pump. With i2cdetect -y 1 I can see the Triac HAT at address 0x47 (71dec).
The documentation (https://www.waveshare.com/wiki/2-CH_TRIAC_HAT#Examples) lists the registers 0x01 to 0x07 to be set for different functions (e.g. set grid frequency, enable/disable one or both Triac channel(s), set conductive angle etc.).

The provided Python demo code (to be found under above mentioned link) is working well. And also the Node-Red "i2c scan" - node is working. My idea for a Node-Red flow was to first initialize the Triac HAT with three single "i2c out" - nodes (mode, enable channel 1, set grid frequency) and then change the conductive angle depending on the desired pump speed with another "i2c out" node. I have configured the "i2c out" - nodes by putting the register address to the "command" field, left the payload field empty and injected the payload by an inject node. This did not work.

Looking to the working Python demo code I am not sure whether I have to send an array for nitialization instead of single bytes. Unfortunately I am not a Python expert. Any help would be much appreciated.

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.