src/software/picoreflow/lib/max31855.py
def read(self):
        '''Reads 32 bits of the SPI bus & stores as an integer in self.data.'''
        bytesin = 0
        # Select the chip
        GPIO.output(self.cs_pin, GPIO.LOW)
        # Read in 32 bits
        for i in range(32):
            GPIO.output(self.clock_pin, GPIO.LOW)
            bytesin = bytesin << 1
            if (GPIO.input(self.data_pin)):
                bytesin = bytesin | 1
            GPIO.output(self.clock_pin, GPIO.HIGH)
        # Unselect the chip
        GPIO.output(self.cs_pin, GPIO.HIGH)
        # Save data
        self.data = bytesin
Reads 32 bits of the SPI bus & stores as an integer in self.data.
Reads 32 bits of the SPI bus & stores as an integer in self.data.
Reads 32 bits of the SPI bus & stores as an integer in self . data .
def read(self):
        bytesin = 0
        GPIO.output(self.cs_pin, GPIO.LOW)
        for i in range(32):
            GPIO.output(self.clock_pin, GPIO.LOW)
            bytesin = bytesin << 1
            if (GPIO.input(self.data_pin)):
                bytesin = bytesin | 1
            GPIO.output(self.clock_pin, GPIO.HIGH)
        GPIO.output(self.cs_pin, GPIO.HIGH)
        self.data = bytesin
def read ( self ) : bytesin = 0 GPIO . output ( self . cs_pin , GPIO . LOW ) for i in range ( 32 ) : GPIO . output ( self . clock_pin , GPIO . LOW ) bytesin = bytesin << 1 if ( GPIO . input ( self . data_pin ) ) : bytesin = bytesin | 1 GPIO . output ( self . clock_pin , GPIO . HIGH ) GPIO . output ( self . cs_pin , GPIO . HIGH ) self . data = bytesin
Reads 32 bits of the SPI bus & stores as an integer in self.data.
Reads 32 bits of the SPI bus & stores as an integer in self . data .
'''Reads 32 bits of the SPI bus & stores as an integer in self.data.''' # Select the chip # Read in 32 bits # Unselect the chip # Save data
self