TypeError: unsupported types for __lshift__: 'tuple', 'int'
Posted: Fri Apr 27, 2018 8:31 am
Hello, i am facing problem of " TypeError: unsupported types for __lshift__: 'tuple', 'int' "
So can anyone help me to solve this Type Error Issue .
Code: Select all
BME280_STANDBY_TIME_1_MS = 0x00
BME280_CONFIG_REG = 0xF5
BME280_CONFIG_REG_TSB__POS = 5
# Read from device
def I2C_ReadRegister(Rd_Addr):
I2C_Rx_Buf = bytearray(2)
if(i2c.readfrom_mem_into(BME280_I2C_ADDRESS1, Rd_Addr, I2C_Rx_Buf) == None):
return(I2C_Rx_Buf[0])
#return Config register value
def BME280_GetConfig():
return I2C_ReadRegister(BME280_CONFIG_REG)
def BME280_SetStandbyTime(Value):
cfgv = 0
cfgv = BME280_GetConfig()
cfgv &= ~BME280_CONFIG_REG_TSB__MSK
[b] cfgv |= Value << BME280_CONFIG_REG_TSB__POS[/b]
BME280_SetStandbyTime(BME280_STANDBY_TIME_1_MS) #Standby time 1ms
So can anyone help me to solve this Type Error Issue .