I am trying to make low power with my arduino and have a problem with i2c bus. Here my config : - arduino mini pro modified (no regul and led) - BH1750 on i2c which is powered by P mosfet (bs250 for the moment) - sleep mode powerdown with pin change interrupt (no watchdog)
At starting, it reads well BH1750. Then I power off with mosfet, put A4 and A5 output=0, and go to sleep (my sleep routine is from Nick Gammon : sleep with pin change).
My problem is when I wake up from pin and power on sensor, I am unable to read again BH1750. It returns 0. In other hand, if i press reset button, it reads ok on startup. So I think I need to deal with i2c register config but I was wondering if Wire.begin does it as in BH1750 lib it uses (and arduino doc tells that it config registers). But it doesn't work for me. Maybe I need to restore another interrupt, but which one???
do you have any ideas about this? Thanks for feedback.