beautypg.com

Rainbow Electronics GM862-GPS User Manual

Page 50

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 50 of 100

2.8.9 IIC object method: dev_gen_write(addr, start, string)

Sends a string to the IIC bus device whose address is addr, starting from address start.
Return value is a Python string which is 1 if data is acknowledged correctly, -1 otherwise.

Example:

a = bus1.dev_gen_write(114, 112, '123456789')

sends the string '123456789' to the IIC bus device at address 114, starting from address 112,
assigning the result to a.