Using Relay Contact on RevPi Connect

Topics about the Hardware of Revolution Pi
Post Reply
User avatar
crismancich
KUNBUS
Posts: 40
Joined: 05 Jan 2021, 11:25
Location: Hamburg
Contact:

Using Relay Contact on RevPi Connect

Post by crismancich »

Hi,

there were multiple questions regarding the use of the relay contact of the RevPi Connect.
It is controlled via the 6th bit of RevPiLED in the process image.

Here's some details:

Code: Select all

BIN                     DEC        	        DESCRIPTION
00000000		0			all off
00000001		1			LED A1 green
00000010		2			LED A1 red
00000011		3			LED A1 orange (red + green)
00000100		4			LED A2 green
00001000		8			LED A2 red
00001100	        12			LED A2 orange (red + green)
00100000		32			Relay Contact	

The binary flags can be combined like this:

Code: Select all

DEC  256|128|64|32|16| 8| 4| 2| 1
BIN    0|  0| 0| 1| 0| 0| 0| 0| 1   =  33   LED A1 green + relay contact active
                32      +       1   =  33

Usage example:
Log on to revolution pi via ssh.

Code: Select all

cd demo
piTest -w RevPiLED,33

Kind reagrds,
Boris
Viele Grüße / Kind regards / Quapla’ / 此致敬意
Boris Crismancich
bmoeller
Posts: 4
Joined: 23 Jul 2021, 21:44

Re: Using Relay Contact on RevPi Connect

Post by bmoeller »

Thanks crismancich, This is good information and got me started to understand how it works. But for the revpi connect I think the table is one bit off. The correct value to to set a# to green and activate the realy is 16+64. At least this worked for me this way.
Last edited by bmoeller on 25 Jul 2021, 09:48, edited 2 times in total.
Post Reply