Hello!
I have a Revolution Pi Connect 4 and I want use de input for conected a sensor, I try it but the RevPi dont detect the signal(24VDC)
Input/Output Revolution Pi Connect 4
Re: Input/Output Revolution Pi Connect 4
Hi great question
A) Create a PiCtory configuration
https://revolutionpi.com/en/tutorials/was-ist-pictory-2
C) Connect digital input of X2 plug
https://revolutionpi.com/en/tutorials/r ... -connect-4
https://revolutionpi.com/en/tutorials/s ... pi-connect
Alternatively, you can do it in the Python way using these commands:
Execute it
A) Create a PiCtory configuration
https://revolutionpi.com/en/tutorials/was-ist-pictory-2
- Drag RevPi Connect 4 module onto virtual DIN rail
- File → Save as start configuration
- Tools → Reset Driver
Code: Select all
pi@RevPi123834:~$ piTest -d
Found 1 devices:
Address: 0 module type: 136 (0x88) RevPi Connect 4 V1.0
Module is present
input offset: 0 length: 6
output offset: 6 length: 7
https://revolutionpi.com/en/tutorials/r ... -connect-4
- IN+ → 24V
- IN- → GND
Code: Select all
pi@RevPi123834:~$ piTest -r RevPiStatus
1 Byte-Value of RevPiStatus: 1 dez (=01 hex)
1 Byte-Value of RevPiStatus: 65 dez (=41 hex)
pi@RevPi123834:~$ piTest -v RevPiStatus
variable name: RevPiStatus
offset: 0
length: 8
bit: 0
pi@RevPi123834:~$ piTest -g 0,6
Get bit 6 at offset 0. Value 1
pi@RevPi123834:~$ piTest -q -g 0,6
1
Alternatively, you can do it in the Python way using these commands:
Code: Select all
# Connect4DigitalInput.py
import revpimodio2
rpi = revpimodio2.RevPiModIO(autorefresh=True)
if(rpi.io.RevPiStatus.value & (1<<6)):
print("High")
else:
print("Low")
Code: Select all
pi@RevPi123834:~$ python3 Connect4DigitalInput.py
Low
pi@RevPi123834:~$ python3 Connect4DigitalInput.py
High