Hello Community !
It’s me, again, with another problem… All time ^^
So i put tsl2561 on raspberry, and raspberry find it ! But when i add to cayenne i have widget but no value… Somebody know why ?
Thank (
Hello Community !
It’s me, again, with another problem… All time ^^
So i put tsl2561 on raspberry, and raspberry find it ! But when i add to cayenne i have widget but no value… Somebody know why ?
Thank (
@adrien.testas are you using MQTT or regular connection?
Is the raspberry pi able to show value of TSL256?
Can you post the code you are using.
I wired it with wire, and i think i forget something, is not like other sensor ? i have to put something more for it work ?
I love this kind of project !
But i have big problem, i’m french and at thé begining it’s difficult to do with english tutoriel… That why i ask lot of question to the community, specific world is long to learn !
You can say me what i have to do for my sensor work ?
---- Shramik salgaonkar a écrit ----
[https://sea1.discourse-cdn.com/flex019/user_avatar/community.mydevices.com/shramiksalgaonkar/45/6319_1.png] shramiksalgaonkarhttp://community.mydevices.com/u/shramiksalgaonkar Regular
November 18
[http://community.mydevices.com/user_avatar/community.mydevices.com/lutefisky/40/1549_1.png] Solar Pool Heater 2016http://community.mydevices.com/t/solar-pool-heater-2016/920?source_topic_id=6245 Projects Made with Cayennehttp://community.mydevices.com/c/project-with-cayenne
About This Project Wife and I had an adult “kiddie” pool last year during the heat of the summer and we spent a lot of time in it during the months of July and August. We upgraded to a larger pool (12’ in diameter, 2500 gallons/9600 L). But living at a northern latitude means keeping the pool warm enough to be comfortable anytime (shoulder season, or after a cool spell) and temperature was going to determine how many times we used it. So I thought of a solar pool project and here’s what I came …
@adrien.testas lets start from scratch.
First of all make sure you have the 12c libraries installed on your Raspberry Pi.
sudo apt-get install python3-smbus
sudo apt-get install i2c-tools
then enable i2c in raspberry pi configuration interface.
lets check if the raspberry reads the value of TSL2561
import smbus
import time
# Get I2C bus
bus = smbus.SMBus(1)
bus.write_byte_data(0x39, 0x00 | 0x80, 0x03)
bus.write_byte_data(0x39, 0x01 | 0x80, 0x02)
time.sleep(0.5)
data = bus.read_i2c_block_data(0x39, 0x0C | 0x80, 2)
data1 = bus.read_i2c_block_data(0x39, 0x0E | 0x80, 2)
# Convert the data
ch0 = data[1] * 256 + data[0]
ch1 = data1[1] * 256 + data1[0]
vResults = ch0-ch1 #get visable light results
print("Reading = ",vResults)
So librairies it’s good but i have invalid syntax when i run line…
remove any space in beginning of the line if present,
Did you get this figured out @adrien.testas ?
~Benny