BH1750 - luminosity sensor


#1

Codes for different boards and shields.
All codes only work with MQTT.

Arduino_MKR1000.txt (1.7 KB)
ArduinoYun.txt (1.6 KB)
ESP8266.txt (1.8 KB)
Arduino_Industrial_101.txt (990 Bytes)
EthernetShieldW5100.txt (1.7 KB)
EthernetShieldW5200.txt (1.7 KB)
EthernetShieldW5500.txt (1.7 KB)
ManualConnection.txt (2.6 KB)
WiFi101Shield.txt (1.8 KB)
WiFiShield.txt (1.8 KB)

Sample from the Cayenne Dashboard.


#2

Can you add the codes for Raspberry Pi 3 Model B


#3

Hi
I do not know much about MQTT with Raspberry Pi and Python.

http://community.mydevices.com/t/bh1750-support/2187


#4

Here’s a (what looks like) good tutorial on reading the sensor with python. I don’t have this sensor so can’t test. Once you get that script working, combine that with the Python MQTT library and you’ll be good to go. Post back if you have any questions.


#6

I got the tutorial and it already run in my python…Unfortunately, I dont know how to combine the data to Cayenne using the MQTT library…


#7

Yeahh…finally I found the solution…my problem has been solved and now the luminosity sensor able to send the data to Cayenne


#8

Good, share your code for other users if you want.