Customer:
I’m trying to control the 2-channel Relay easyC from a Raspberry Pi using i2cset commands like i2cset -y 1 0x30 0x00 0x00 i, but I can’t find documentation about which register values turn the relays on and off.
Originally submitted via email support on 9 December 2024. Migrated to the forum for community visibility.
Soldered Support:
The first byte represents the channel, and the second byte determines the mode (on or off).
Channel 1, off state: 0x00 0x00
Channel 1, on state: 0x00 0x01
Channel 2, off state: 0x01 0x00
Channel 2, on state: 0x01 0x01
In your message, you used 0x00 0x00, which corresponds to turning Channel 1 off.
Soldered Support:
It’s not possible to directly read the relay state from the MCU. However, you can implement logic in your code to track the state of each relay. Alternatively, in the development branch of the relay library, there is ATtiny firmware available which you can use to add functionality for reading the relay state.