TSL2591 - opencardev/crankshaft GitHub Wiki

Post Alpha 7.2

TSL 2561 support is the default using address 0x29 as shown below. To switch to TSL2591 change the setting LIGHTSENSOR_TYPE='TSL2691'

# LightSensor
LIGHTSENSOR_TYPE='TSL2561' # Allowed Values TSL2561 TSL2591
# the address of TSL2561/TSL2591 can be
# 0x29, 0x39 or 0x49
TSL_I2C_BUS=1
TSL_ADDR=0x29

Pre Alpha 7.2

Instead of a TSL2561 if you accidentally get a TSL2591 you can use the following instead. Follow all of the same instructions under brightness sensor and then in dev mode:

  1. Install pip3 if you don't already have it with sudo apt-get install python3-pip
  2. sudo pip3 install python-tsl2591 smbus Sudo is important here, otherwise the module will disappear after a reboot
  3. cp /opt/crankshaft/service_lightsensor.py /opt/crankshaft/service_lightsensor.py.old
  4. insert the file from the repository here at /opt/crankshaft/service_lightsensor.py
  5. reboot to regular mode
  6. Profit