BH1750 & Lolin

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
chipfryer27
Valued Contributor
Posts: 1147
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

BH1750 & Lolin

Post by chipfryer27 »

Hi

Trying to use the BH1750 light sensor with an ESP32-Lolin.

First issue was pin remap.

Although within FC I can remap I2C pins for Ch1 / Ch2 / Software, I couldn't move them to pins IO34/35. Analyser confirms no activity on these pins.

From datasheet it has Hardware Ch1 on pins IO00/04 and using FC Ch1 on these pins an analyser shows activity and the returns a value of 1792 irrespective of whether the sensor is connected or not.

With Software Ch on these pins there is no activity on the pins.

Datasheet has Ch2 on IO15/02 and analyser shows activity with a return of 45824 irrespective of whetherthe sensor is connected or not.

The sensor works fine on a Pico (thanks to Medelec35) so it's good.

Not having used I2C on an ESP32-Lolin before I then attempted to use an OLED based on a SSD1306 that I've used many times before. A simple "Hello World" string was created with the display on Ch1 (IO00/04) and this worked perfectly.

Regards

Post Reply