Ejemplo n.º 1
0
 def __init__(self, pins, begin, connection=None):
     '''
     :param pins: [lcd_Addr, enable, Rw, Rs, d4, d5, d6, d7, backlighPin, pol]
     :param begin: [cols, rows]
     '''
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pins, begin)
Ejemplo n.º 2
0
 def __init__(self, pins, begin, connection=None):
     '''
     :param pins: [rs, enable, d4, d5, d6, d7]
     :param begin: [cols, rows]
     '''
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pins, begin)
Ejemplo n.º 3
0
 def __init__(self, pins, begin, connection=None):
     '''
     :param pins: [lcd_Addr, enable, Rw, Rs, d4, d5, d6, d7, backlighPin, pol]
     :param begin: [cols, rows]
     '''
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pins, begin)
Ejemplo n.º 4
0
 def __init__(self, pins, begin, connection=None):
     '''
     :param pins: [rs, enable, d4, d5, d6, d7]
     :param begin: [cols, rows]
     '''
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pins, begin)
Ejemplo n.º 5
0
 def __init__(self, revsteps, pin1, pin2, speed=None, connection=None, pin3=None, pin4=None):
     ArduinoObject.__init__(self, connection=connection)
     if pin3 is not None and pin4 is not None:
         self.id = self.call('new', revsteps, pin1, pin2, pin3, pin4)
     else:
         self.id = self.call('new', revsteps, pin1, pin2)
     if speed:
         self.setSpeed(speed)
Ejemplo n.º 6
0
    def __init__(self,
                 interface=4,
                 pin1=2,
                 pin2=3,
                 pin3=4,
                 pin4=5,
                 enable=True,
                 connection=None):
        
		ArduinoObject.__init__(self, connection=connection)
Ejemplo n.º 7
0
 def __init__(self, trigPin, echoPin, connection=None):
     """
     Class constructor.
     :param trigPin: trigger Pin
     :param echoPin: eccho Pin
     :param connection: optional connection parameter. If not provided will attempt to connect to default usb port.
     (i think).
     """
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', trigPin, echoPin)
Ejemplo n.º 8
0
    def __init__(self, led_type, num_leds, connection=None, matrix=None, serpentine=None):
        ArduinoObject.__init__(self, connection=connection)

        self.serpentineLayout = True if serpentine else False
        self.rgb_order = 12

        print("Number of LEDS: {0}\nLED Type: {1}".format(num_leds, led_type))

        if matrix is not None and type(matrix) is list:
            self.matrixHeight = matrix[0]
            self.matrixWidth = matrix[1]
            self.num_leds = (self.matrixHeight * self.matrixWidth) + 1
        else:
            self.matrixWidth = None
            self.matrixHeight = None
            self.num_leds = num_leds

        self.id = self.call('new', led_type, self.num_leds, self.rgb_order)

        return
Ejemplo n.º 9
0
 def __init__(self, pin_dout, pin_slk, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pin_dout, pin_slk)
Ejemplo n.º 10
0
 def __init__(self, pin, count, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pin, count)
Ejemplo n.º 11
0
 def __init__(self, pin):
     ArduinoObject.__init__(self)
     self.id = self.call('new', pin)
Ejemplo n.º 12
0
 def __init__(self, echo, trig, useInches, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', echo, trig, useInches)
Ejemplo n.º 13
0
 def __init__(self, port, length, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', port, length)
Ejemplo n.º 14
0
 def __init__(self, dac, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', dac)
Ejemplo n.º 15
0
 def __init__(self, pin, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.pin = pin
     self.id = self.call("new", pin)
Ejemplo n.º 16
0
 def __init__(self, echo, trig, useInches, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', echo, trig, useInches)
Ejemplo n.º 17
0
 def __init__(self, revsteps, pin1, pin2, speed=None):
     ArduinoObject.__init__(self)
     self.id = self.call('new', revsteps, pin1, pin2)
     if speed:
         self.setSpeed(speed)
Ejemplo n.º 18
0
 def __init__(self, address=BME280_I2CADDR, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', address)
Ejemplo n.º 19
0
 def __init__(self, revsteps, pin1, pin2, speed=None):
     ArduinoObject.__init__(self)
     self.id = self.call('new', revsteps, pin1, pin2)
     if speed:
         self.setSpeed(speed)
Ejemplo n.º 20
0
 def __init__(self, boardTotal, clock, data, latch, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', boardTotal, clock, data, latch)
 def __init__(self, s0, s1, s2, s3, sensorInput, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', s0, s1, s2, s3, sensorInput)
Ejemplo n.º 22
0
 def __init__(self, pin, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', pin)
Ejemplo n.º 23
0
 def __init__(self, pin1, pin2):
     ArduinoObject.__init__(self)
     self.id = self.call("new", pin1, pin2)
Ejemplo n.º 24
0
 def __init__(self, pin, _type, count = 6):
     ArduinoObject.__init__(self)
     self.id = self.call('new', pin, _type, count)
Ejemplo n.º 25
0
Archivo: dht.py Proyecto: joppi/nanpy
 def __init__(self, pin, _type, count=6, connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call("new", pin, _type, count)
Ejemplo n.º 26
0
 def __init__(self,
              address=TMP007_I2CADDR,
              sample_rate=TMP007_CFG_16SAMPLE,
              connection=None):
     ArduinoObject.__init__(self, connection=connection)
     self.id = self.call('new', address, sample_rate)