In this tutorial you will learn how to use BH-1750 ambient light sensor with Visuino.
The values from the sensor will be displayed in Visuino Instrument for better visualization.
Watch the Video!
This project was made by Visuino user RafaΕ. Visit his youtube channel here: https://www.youtube.com/@Edappl/videos
Step 1: What You Will Need
- Arduino UNO or Arduino Mega (or any other board)
- BH-1750 ambient light sensor
- Visuino program: Download Visuino
- Jumper wires




Step 2: The Circuit
- Connect BH-1750 Sensor pin [SCL] to Arduino pin [SCL]
- Connect BH-1750 Sensor pin [SDA] to Arduino pin [SDA]
- Connect BH-1750 Sensor pin [VCC] to Arduino pin [5v]
- Connect BH-1750 Sensor pin [GND] to Arduino pin [GND]

Step 3: Start Visuino, and Select the Arduino UNO Board Type
Start Visuino as shown in the first picture Click on the βToolsβ button on the Arduino component (Picture 1) in Visuino When the dialog appears, select βArduino UNOβ as shown on Picture 2


Step 4: In Visuino Add Components
- Add βClock Generatorβ component
- Add βClock Multi Sourceβ component
- Add βROHM BH1750 Ambient Light Sensor (I2C)β component
- Add βMap Range Analogβ component
- Add βPacketβ component





Step 5: In Visuino Set Components
- Select βClockGenerator1β and in the properties window set βFrequencyβ to 10
- Select βMapRange1β and in the properties window set βInput Rangeβ > βMaxβ to 54612 and βOutput Rangeβ > βMaxβ to 100
- Double click on βPacket1β and in the Elements window drag βAnalogβ to the left side and in the properties window set βVisualizationβ > βScaleβ > βMaxβ to 100
Note: you can adjust the MapRange1 output Max and Packet1 Analog1 Scale Max according to your needs
also you can change the βInstrumentβ to something else




Step 6: In Visuino Connect Components
- Connect βClockGenerator1β pin [Out] to βMultiSource1β pin [In]
- Connect βMultiSource1β pin [0] to βLightSensor1β pin [Clock]
- Connect βMultiSource1β pin [1] to βPacket1β pin [Clock]
- Connect βLightSensor1β pin [Out] to βMapRange1β pin [In]
- Connect βLightSensor1β pin [I2C] to Arduino pin [I2C]
- Connect βMapRange1β pin [Out] to βPacket1β > βAnalog1β pin [In]
- Connect βPacket1β pin [Out] to Arduino serial 0 pin [In]


Step 7: Generate, Compile, and Upload the Arduino Code

Step 8: Play
If you power the Arduino module, at the bottom click on the βSerialβ Tab > βInstrumentsβ, make sure you selected the correct port and click βConnectβ button. You should start to see the values from the sensor.
Since the βClockGenerator1β frequency is 10Hz we are getting values 10x every second, you can adjust the Frequency of the βClockGenerator1β in the properties window.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it here and open it in Visuino: https://www.visuino.eu
