Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. João Gouveia
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by João Gouveia

    • RE: BH1750 library hangs

      @alexsh1 Very true 🙂 Anyways, thanks for the tips!

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 I just realized my full blown stupidity. The breadboard I am using has the buses connected half way and I was convinced they were fully connected. So the light sensor was not getting power, obviously. 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ 😅 😅 😅 😅

      It works now.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 Thanks I will check it out and give it a try! 🙂 I'll let you know the results

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 I think I will try to get a more reliable FTDI since this one seems to give me some troubles. It also isn't properly detected on my PC sometimes. Is there a reliable one I could get from, for example, aliexpress, you recommend? My knowledge on these is close to zero, hahaha. Thanks. 🙂

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 Hm that seems reasonable. The FTDI board I have seems to be a bit funky it gives a lot of errors when I am trying to upload sometimes. Could that be related? I am not sure if it is the FTDI or the mini pro itself though.

      I don't have another type with me though.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 I ran this example: https://playground.arduino.cc/Main/I2cScanner (I'm not sure if this is what you meant).

      It seems to hang on Wire.endTransmition() it prints the string "Scanning..." but nothing else.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 There doesn't seem to be no RF issues, no. The freezing occurs on Wire.endTransmition(), not begin. I meant the begin function of the BH1750 library from MySensors, sorry if that wasn't very clear.

      SDA and SDL seem to be connected correcly. I've checked that a few times now.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      Not at the moment but I ordered a DHT22 sensor I can try that when it arrives.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      I have tried with both a GY-302 and a GY-30 and both don't work although they show different problems (mentioned on my OP). Both the sensors work well when connected to the pi.

      I don't have a drawing of the circuit but I can show you a picture, if it helps.

      0_1522680160710_IMG_20180402_163933.jpg

      The diagram is essential like this one but without the temperature sensor and I am currently using an FTDI board to provide the power, instead of a battery.

      The SCL is connected to A5 and the SDA to A4 of the mini pro.

      I can also do a drawing, if further info is required but, as I said, it is like the one I linked above.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • RE: BH1750 library hangs

      @alexsh1 said in BH1750 library hangs:

      ESP8266

      You mean a different model? Unfortunately I don't have another model to test it, only mini pro. I have tried another mini pro (same manufacturer though). I also don't have another model of the radio. But the messages are being sent properly so I am not sure if the problem could come from that.

      posted in Troubleshooting
      João Gouveia
      João Gouveia
    • BH1750 library hangs

      Hello everyone!

      I have been am trying to make a wireless light sensor to connect to my home assistant. As of now I have been successfully using one connected directly to the pi but I want to be able to eventually use different ones and spread them around the house so I decided to go with MySensors for that.

      I have an Arduino mini pro connected to an NRF24L01+ wireless radio that uses my Pi as the gateway. I have successfully established a connection and I am able to send messages to the Pi and see the results in home assistant.
      What I don't seem to be able to do is get information from the light sensor. I am using a BH1750 light sensor for that.

      I have two versions, one is the GY-302 (small one) and the other GY-30 (longer one). They both work well when connected directly to the pi. I can get light levels both through a python script and directly to home assistant.
      When I connect them to my arduino though the BH1750 library doesn't work.

      • With the GY-302 it just crashes on calling begin. I have dug under the library and realized it hangs on the call endTransmission.
      • With the GY-30 it does not hang but instead it always reports the same value of lux, no matter how much light I put on it or how much light I remove from it. The value is always 54612.

      I am a software engineer by profession so my circuit skills are extremely low and it is likely I am doing something wrong.
      At first I thought that, since I am a newbie, I fried something while soldering so I soldered a new mini pro (same manufacturer) but I got the same results.

      I was mostly following this guide online: http://sebastiaanschimmel.me/blog/2015/06/arduino-temp-hum-light-sensor.html so my circuit looks like the one described (without the temperature sensor). I can send pictures of it if required.

      The boards I got are the following:
      https://www.aliexpress.com/item/WAVGAT-Atmega328-3-3V-Version-Pro-Mini-Module-16M-For-Arduino-Compatible/32820596876.html?spm=a2g0s.9042311.0.0.rYlqk6
      https://www.aliexpress.com/item/1Pcs-New-Arrival-BH1750FVI-GY-302-GY302-Digital-Light-intensity-Sensor-BH1750-16bitAD-Module-For-AVR/32821717980.html?spm=a2g0s.9042311.0.0.rYlqk6
      https://www.aliexpress.com/item/1pc-Basic-Breakout-Board-For-FTDI-FT232RL-USB-to-Serial-IC-For-Hot-Top-Sale/32648158894.html?spm=a2g0s.9042311.0.0.2Wt045

      Hope someone is able to help! 🙂

      Thanks and sorry for the long post!!

      posted in Troubleshooting
      João Gouveia
      João Gouveia