Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relay Hat Question - I2C
#11
Glad it's working.

In case you haven't found it yet, you can increase the number of station to 16 by going to Options > Station handling > Extension boards and change from 0 to 1.

Each "Extension board" increases the number of stations by 8.
<p><br></p>
Reply
#12
Update:

The cli_control plugin has been updated.
It no longer requires restarting SIP for the commands to work.

Also, some code has been added to handle changes in the number of stations. If you change from 8 stations to 16 or more it will adjust automatically. Same goes for reducing the number of stations.

You should be able to install the updated version of the plugin over the older version. That will preserve any commands you have saved in the older version.

Dan
<p><br></p>
Reply
#13
Hello Dan -

Were you ever able to create a working plugin for the 4-channel replay HAT discussed in the thread? I'm just beginning to learn the Pi and would really like to get your software working with this HAT:

https://wiki.52pi.com/index.php/DockerPi...U:_EP-0099

Thanks!

Andre'
Reply
#14
Hi Andre'

You should be able to use the cli plugin and the commands from the web site of the hat vendor:

Direct control without programming(Raspberry Pi:
  • Turn on channel No.1 relay
Code:
i2cset -y 1 0x10 0x01 0xFF

  • Turn off channel No.1 relay
Code:
i2cset -y 1 0x10 0x01 0x00



  • Turn on channel No.2 relay
Code:
i2cset -y 1 0x10 0x02 0xFF

  • Turn off channel No.2 relay
Code:
i2cset -y 1 0x10 0x02 0x00



  • Turn on channel No.3 relay
Code:
i2cset -y 1 0x10 0x03 0xFF

  • Turn off channel No.3 relay
Code:
i2cset -y 1 0x10 0x03 0x00



  • Turn on channel No.4 relay
Code:
i2cset -y 1 0x10 0x04 0xFF

  • Turn off channel No.4 relay
Code:
i2cset -y 1 0x10 0x04 0x00


On the setup page of the cli plugin enter the commands above for each relay channel in the on and off columns.
<p><br></p>
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)