Esempio n. 1
0
 def __init__(self, explorer_address = Explorer_ADDRESS):
     #the Explorer address
     OpenElectrons_i2c.__init__(self, explorer_address >> 1)
Esempio n. 2
0
 def __init__(self, address = I2C_ADDRESS):
     OpenElectrons_i2c.__init__(self, address >> 1)  
    'x': [0x44, 0x28, 0x10, 0x28, 0x44],
    'y': [0x0c, 0x50, 0x50, 0x50, 0x3c],
    'z': [0x44, 0x64, 0x54, 0x4c, 0x44],
    '{': [0x00, 0x08, 0x36, 0x41, 0x41],
    '|': [0x00, 0x00, 0x7f, 0x00, 0x00],
    '}': [0x41, 0x41, 0x36, 0x08, 0x00],
    '~': [0x04, 0x02, 0x04, 0x08, 0x04],
}

import time
import os, sys
from OpenElectrons_i2c import OpenElectrons_i2c
from OpenElectrons_LSM303 import MAG

test = 1
oe = OpenElectrons_i2c(0x38)
lsm = MAG()
str = "OpenElectrons.com"
length = len(str)
index = 0
test = 1
g = 9.81
t = .25
count = 0
print str

while test == 1:
    #turn leds off
    oe.simpleWriteByte(0xff)
    #get first value
    array = lsm.readArray(lsm.MAG_X_Y_Z | 0x80, 6)
Esempio n. 4
0
 def __init__(self, SmartDrive_address=SmartDrive_ADDRESS):
     #the SmartDrive address
     OpenElectrons_i2c.__init__(self, SmartDrive_address >> 1)
Esempio n. 5
0
    def __init__(self):

        #define the pilight address
        OpenElectrons_i2c.__init__(self, self.PILIGHT_ADDRESS)
Esempio n. 6
0
 def __init__(self, pilight_address = PILIGHT_ADDRESS):
     OpenElectrons_i2c.__init__(self, pilight_address >> 1)