Telit EZ10-GPRS/-PCS
Product Description
80269ST10014a, Rev. 3 – 26/09/05
Reproduction forbidden without written authorization by Telit Communications S.p.A.
Page 51 of 74
All Rights reserved – Right of modification reserved
Example:
a = MOD.secCounter()
returns seconds elapsed since 1 January 1970.
3.3.5.4.2 MOD.sleep(sleeptime)
Blocks Python script execution for a given time returning the resources to the system.
Input parameter timesleep is a Python integer which is the time in 1/10 s to block script execution.
No return value.
Example:
MOD.sleep(15)
blocks Python script for 1.5 s.
3.3.5.4.3 MOD.reactivatePython()
Reactivates Python script after exiting from actual Python script.
This method is useful for Python script restart.
The effect of this method is to restart the complete procedure of selecting the Python script to be
executed and of executing it.
If you want this method to have the expected effect you need to exit actual Python script as soon
as possible after calling it (for example braking while or for loops).
No input parameter.
No return value.
Example:
MOD.reactivatePython()
reactivates Python after next exiting from Python script.
3.3.5.5 IIC built-in module
IIC built-in module is an implementation on the Python core of the IIC bus Master (No Multi-Master)
using the "bit-banging" technique.
You need to use IIC built-in module if you want to create one or more IIC bus on the available
GPIO pins. This IIC bus handling module is mapped on creation on two GPIO pins that will become
the Serial Data and Serial Clock pins of the bus. It can be multi-instantiated (you can create more
than one IIC bus over different pins) and the pins used must not be used for other purposes.
Note that Python core does not verify if the pins are already used for other purposes (SPI module
or GPIO module) by other functions, it's the applicator responsibility to ensure that no conflict over
pins occurs.
If you want to use IIC built-in module you need to import it first:
import IIC
then you can create the new bus over the GPIO pins (for example over the pins GPIO3, GPIO4)
and then use IIC built-in module methods like in the following example:
IICbus = IIC.new(3,4)
IICbus.init()
res = IICbus.send('test')