05-25-2022, 09:55 AM
(09-24-2019, 02:57 PM)prinzpi Wrote: Thanks for the fast reply @765GHF.
Seems to be working, at least the sensor will be detected.
May just need to play a little bit with the range values - I will see.
I would also like to use auto brightness (within Crankshaft I have used this too).
I have tried to follow the readme instruction from the first entry.
But when I try to start the service, I'm facing following error:
● lightsensor.service - Pi Lightsensor Service Loaded: loaded (/etc/systemd/system/lightsensor.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-09-24 15:30:34 CEST; 55s ago Process: 1406 ExecStart=/opt/lightsensor/service_lightsensor.py (code=exited, status=2) Process: 1407 ExecStartPost=/bin/touch /tmp/auto_brightness_active (code=exited, status=0/SUCCESS) Main PID: 1406 (code=exited, status=2) Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Service RestartSec=5s expired, scheduling restart. Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Scheduled restart job, restart counter is at 3. Sep 24 15:30:34 raspberrypi systemd[1]: Stopped Pi Lightsensor Service. Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Start request repeated too quickly. Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Failed with result 'exit-code'. Sep 24 15:30:34 raspberrypi systemd[1]: Failed to start Pi Lightsensor Service.
I'm not sure what's going wrong here.
I have created the lightsensor folder inside /opt and applied the execution rights (chmod +x) for the necessary files which I have copied to the Pi via an USB stick.
Any ideas?
(07-09-2021, 06:14 PM)etannerm Wrote:(03-03-2020, 05:53 PM)brentil Wrote: Can this work with the newer TSL2591 based sensor? I know it uses I2C 7-bit address 0x29 and 0x28 from their documentation.
Have you had any luck?
I have just attempted an installation from:
http://www.cqrobot.wiki/index.php/TSL2591X_Light_Sensor
But when I try to execute this part:
sudo apt-get install p7zip-full
7z x TSL2591X_Light_Sensor_code.7z -r -o./TSL2591X_Light_Sensor_code
sudo chmod 777 -R TSL2591X_Light_Sensor_code
And I select Y in the terminal to continue with the installation, it is aborted with no explanation.
Does anyone know what I am doing incorrectly?
no idea what you are doing wrong but have had no luck getting the TSL1591 working