beautypg.com

8 gpio.getaxe()9, 9 gpio.setsled(status, onduration, offduration), 10 gpio.getcbc()9 – Rainbow Electronics GM862-GPS User Manual

Page 41: 8 gpio.getaxe(), 10 gpio.getcbc()

background image





Easy Script

in Python

80000ST10020a Rev.8 - 01/10/08

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 41 of 100

2.6.8 GPIO.getAXE()

9

Gets hands free status value in the same way as AT#AXE command. There is no input parameter.
Return value is a Python integer that is 0 if a hand free is not connected or 1 if a hand free is
connected.

Example:

hf = GPIO.getAXE()

gets AXE value, assigning return value to hf.

2.6.9 GPIO.setSLED(status, onDuration, offDuration)

10

Sets status led configuration values in the same way as AT#SLED does. First input parameter status
is a Python integer that represents the configuration of status led and can assume the following
values:

0 - ALWAYS OFF
1 - ALWAYS ON
2 - AUTO
3 - BLINKING

Second input parameter onDuration is a Python integer which is the period of ON configuration of
status led in 1/10 s. Third input parameter offDuration is a Python integer which is the period of OFF
configuration of status led in 1/10 s.
Return value is a Python integer which is -1 if an error occurred otherwise it is 1.

Example:

res = GPIO.setSLED(3, 10, 90)

sets status led configuration to blinking with 1s in ON period and 9s in OFF period, assigning return
value to res.

2.6.10 GPIO.getCBC()

9

Gets charger status and battery voltage values in the same way as AT#CBC command. There are no
input parameter.
Return value is a Python tuple formatted in the following way:

(chargerStatus, batteryVoltage).


First element of tuple is a Python integer which is charger status:

10

Available only for modules with following Order-Num.: GM862PYT***-***, , GE863PYT***-***, , GM862GPS***-

***, GE863GPS***-***, GC864PYT***-***, GC864PC2***-***, GE864PYH***-***, and the old 3990250657 and
3990250660