Skip to content

Relay Hats

dgitz edited this page Jun 3, 2021 · 8 revisions

Relay Hats

Currently Supported Relay Hats:

Configuration

Sample Configuration

"RelayHat1": {
		"Parent": "BuildServer1",
		"Type": "RelayHat",
		"Model": "RPi Relay Hat",
		"Capability": "GPIO",
		"UseDefaultConfig": true,
		"Ports": [{
			"Name": "Port0",
			"Type": "DIGITAL",
			"Direction": "OUTPUT",
			"Channels": [{
				"ChannelName": "26",
				"Type": "DIGITAL",
				"Direction": "OUTPUT",
				"PinNumber": 0,
				"DefaultValue": 0,
				"MinValue": 0,
				"MaxValue": 1
			},{
				"ChannelName": "20",
				"Type": "DIGITAL",
				"Direction": "OUTPUT",
				"PinNumber": 1,
				"DefaultValue": 0,
				"MinValue": 0,
				"MaxValue": 1
			},{
				"ChannelName": "21",
				"Type": "DIGITAL",
				"Direction": "OUTPUT",
				"PinNumber": 2,
				"DefaultValue": 0,
				"MinValue": 0,
				"MaxValue": 1
			}
		]
	}]

Troubleshooting

Error: Unable to export GPIO:/sys/class/gpio/export

  • You need fix your permissions on the user account.
  • Make sure you have the right groups on your account: dialout gpio
  • Do: sudo useradd -g robot gpio and log out/log in

Future Features

  • Support non-standard configuration: configurable default values

Clone this wiki locally