Hi,
Fireball003, if you want to split your scripts you have to write them as differents scripts, by example:
#my large dummy script
#
import MDM
#
while 1:
Tx="at#gpio=4,1,0\r"
res=MDM.send(Tx,0)
Tx="at#gpio=6,1,0\r"
res=MDM.send(Tx,0)
Tx="at#gpio=7,1,1\r"
res=MDM.send(Tx,0)
we’re going to split into 3 differents scripts, with functions inside them, named scr1.py, scr2.py and guess what…scr3.py
#scr1.py, a dummy script
#
import MDM
def GPIO_CONF4:
Tx="at#gpio=4,1,0\r"
res=MDM.send(Tx,0)
return
#scr2.py, another dummy script
#
import MDM
def GPIO_CONF6:
Tx="at#gpio=6,1,0\r"
res=MDM.send(Tx,0)
return
#scr3.py, and my last dummy script
#
import MDM
def GPIO_CONF7:
Tx="at#gpio=7,1,1\r"
res=MDM.send(Tx,0)
return
Ok, we have 3 differents scripts with their functions.
Now we write our main script, named obviously main.py
#main dummy script
#
import scr1
import scr2
import scr3
#
while 1:
scr1.GPIO_CONF4
scr2.GPIO_CONF6
scr3.GPIO_CONF7
after that, we have to compile main.py, scr1.py, scr2.py and scr3.py and download it into telit modem, enable main and voila!!
Try with your codes
