Python module for accessing the device¶
Connecting to the device¶
>>> from SEEL import interface
>>> I = interface.connect() #Returns None if device isn't found
# An example function that measures voltage present at the specified analog input
>>> print I.get_average_voltage('CH1')

Sub-Instance I2C of the Interface library contains methods to access devices connected to the I2C port.¶
Simple example:
>>> I.I2C.start(ADDRESS,0) #writing mode . reading mode=1
>>> I.I2C.send(0x01)
>>> I.I2C.stop()
Bulk Write:
>>> I.I2C.writeBulk(ADDRESS,[Byte 1,Byte 2....])

See also
I2C
for complete documentation
Sub-Instance SPI of the Interface library contains methods to access devices connected to the SPI port.¶
- example::
>>> I=Interface() >>> I.SPI.start('CS1') >>> I.SPI.send16(0xAAFF) >>> print I.SPI.send16(0xFFFF) some number

See also
SPI
for complete documentation
Methods to access wireless sensor nodes¶
- Example::
>>> I=interface.Interface() #Start listening to any nodes being switched on. >>> I.NRF.start_token_manager() #Wait for at least one node to register itself >>> while 1: >>> lst = I.NRF.get_nodelist() >>> print lst >>> time.sleep(0.5) >>> if(len(lst)>0):break >>> I.NRF.stop_token_manager() # Registrations closed! # lst = dictionary with node addresses as keys, # and I2C sensors as values >>> LINK = I.newRadioLink(address=lst.keys()[0]) #SEELablet automatically transmits data to LINK's address, #and retrieves preliminary info. >>> print LINK.I2C_scan()
see Wireless node being used with accelerometers and gyroscopes
See also
NRF24L01
for complete documentation