Hello,
I am using the RF100 and the protoboard.
When ONLY setting up the GPIO_5 (mapped to the S1 switch) to generate a HOOK_GPIN event, pressing/depressing the S1 swicth generates the events as expected always.
When adding a secondary gpio to generate an additional HOOK_GPIN event, pressing/depressing the S1 swicth generates ONLY the very first event ALWAYS, and then they are not generated. The secondary GPIO generates the events most of the time.
Can't two or more GPIO's be used simultaneously to generate HOOK_GPIN events?
The code used to set it up is:
...
RTC_ALARM_PIN = BUTTON_PIN
XL345_AXIS_INT1 = GPIO_6
setPinDir(XL345_AXIS_INT1, False)
setPinPullup(XL345_AXIS_INT1, False)
monitorPin(RTC_ALARM_PIN, True)
wakeupOn(RTC_ALARM_PIN, True, False)
monitorPin(XL345_AXIS_INT1, True)
wakeupOn(XL345_AXIS_INT1, True, False)
...
And the code used for event handler is:
@setHook(HOOK_GPIN)
def wakeUpEvent(pinNum, isSet):
global RTC_ALARM_PIN
global XL345_AXIS_INT1
rpc(portalAddr, 'logEvent', "+wakeUpEvent" + ", pinNum:" + str(pinNum) + ", isSet:" + str(isSet))
Thanks,
Eugen
I am using the RF100 and the protoboard.
When ONLY setting up the GPIO_5 (mapped to the S1 switch) to generate a HOOK_GPIN event, pressing/depressing the S1 swicth generates the events as expected always.
When adding a secondary gpio to generate an additional HOOK_GPIN event, pressing/depressing the S1 swicth generates ONLY the very first event ALWAYS, and then they are not generated. The secondary GPIO generates the events most of the time.
Can't two or more GPIO's be used simultaneously to generate HOOK_GPIN events?
The code used to set it up is:
...
RTC_ALARM_PIN = BUTTON_PIN
XL345_AXIS_INT1 = GPIO_6
setPinDir(XL345_AXIS_INT1, False)
setPinPullup(XL345_AXIS_INT1, False)
monitorPin(RTC_ALARM_PIN, True)
wakeupOn(RTC_ALARM_PIN, True, False)
monitorPin(XL345_AXIS_INT1, True)
wakeupOn(XL345_AXIS_INT1, True, False)
...
And the code used for event handler is:
@setHook(HOOK_GPIN)
def wakeUpEvent(pinNum, isSet):
global RTC_ALARM_PIN
global XL345_AXIS_INT1
rpc(portalAddr, 'logEvent', "+wakeUpEvent" + ", pinNum:" + str(pinNum) + ", isSet:" + str(isSet))
Thanks,
Eugen
Comment