This class provides direct Access to the Revolution Pi core / connect values, in addition to the Features that all devices have.
See special objects for Connect / Flat at the end of this page.
revpimodio2.device.Core()
Classattributes
.core.a1green
.core.a1red
.core.a2green
.core.a2red
.core.a3green
.core.a3red
.core.a4green
.core.a4red
.core.a5green
.core.a5red
These IO objects can be used to control the LEDs on the Core / Connect withTrue
/False
. If you want to switch A1 LED on the core green, you have to set.core.a1green.value = True
and.core.a1red.value = False
. This IOs are real IO objects and support all features an function of this.
These attributes provide an alternative to.core.A1 = revpimodio2.GREEN
, which manage both LED bits to produce the desired color.
(a3green
,a3red
only available on RevPi Connect / Flat)
(a4green
,a4red
,a5green
,a5red
only available on RevPi Flat)
.core.A1
.core.A2
.core.A3
.core.A4
.core.A5
Sets or returns the status of LED A1, A2, A3 on PiCore / PiConnect.
(A3 only available on RevPi Connect / Flat)
(A4, A5 only available on RevPi Flat
revpimodio2.OFF = off
revpimodio2.GREEN = green
revpimodio2.RED = red
.core.errorlimit1
Sets or returns the ErrorLimit1 of the piBridge.
.core.errorlimit2
Sets or returns the ErrorLimit2 of the piBridge.
.core.frequency
Returns the CPU clockfrequency of the RevPi Core.
.core.iocycle
Returns the cycletime of the piBridge.
.core.ioerrorcount
Returns the number of errors from the RS485 Bus of the piBridge.
.core.leftgate
True, if a piGate module is connected on the left of the RevPi.
.core.missingdeviceorgate
True, if and IO module is configured in piGate but is not connected.
.core.overunderflow
True, if a module occupies more or less memory than configured.
.core.picontrolrunning
True, if piControl driver is running.
.core.rightgate
True, if a piGate module is connected on the right of the RevPi.
.core.temperature
Returns the CPU temperature from the RevPi Core.
.core.unconfdevice
True, if an IO module is not configured with PiCttory but it is connected.
.core.wd
IO object for the hard- / software watchdog.
If you are using RevPiPyLoad, you can configure a software watchdog, to monitor your program. On the Connect it will toggle the hardware watchdog.
You can use this like every other IO object on the RevPi.
For example.core.wd.value
to get the value or.core.wd.value = not .core.wd.value
to trigger the value and keep the watchdog “alive”. Of course you can use.core.wd.reg_event(...)
or.core.wd.reg_timerevent(...)
and all other functions, too.
Classfunctions
wd_toggle()
Toggles the bit value of the Hard- / Software watchdog.
Only on Revolution Pi Connect
revpimodio2.device.Connect()
.core.x2in
IO object for the input on X2 on your RevPi Connect.
You can use this like every other IO object on the RevPi.
For example.core.x2in.value
to get the value. Of course you can use.core.x2in.reg_event(...)
or.core.x2in.reg_timerevent(...)
and all other functions, too.
.core.x2out
IO object for the output relay on X2 on your RevPi Connect.
You can use this like every other IO object on the RevPi.
For example.core.x2out.value
to get the value or.core.x2out.value = True
to set the value. Of course you can use.core.x2out.reg_event(...)
or.core.x2out.reg_timerevent(...)
and all other functions, too.
Only on Revolution Pi Flat
revpimodio2.device.Flat()
.core.switch
IO object for the switch button your RevPi Flat.
You can use this like every other IO object on the RevPi.
For example.core.switch.value
to get the value. Of course you can use.core.switch.reg_event(...)
or.core.switch.reg_timerevent(...)
and all other functions, too.
.core.relais
IO object for the output relay on your RevPi Flat.
You can use this like every other IO object on the RevPi.
For example.core.relais.value
to get the value or.core.relais.value = True
to set the value. Of course you can use.core.relais.reg_event(...)
or.core.relais.reg_timerevent(...)
and all other functions, too.