TIMOTHY MWALA
Published © GPL3+

Build Your Own Luxmeter πŸŽ‰

Measure light like a pro! Build your own Luxmeter with our DIY kit. Accurate readings, customizable design. Shed light on your world! 🌍

BeginnerFull instructions provided1 hour452
Build Your Own Luxmeter πŸŽ‰

Things used in this project

Hardware components

BH1750 ambient light sensor
×1
Adafruit O.66 OLED display
×1
C3-Mini
×1
Triple adapter
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Components simple scheme

Here is all you need for your project

Code

Sketch

C/C++
This code runs with the C3 mini and BH1750-Ambient light sensor
#include <Wire.h> 
 #include <Adafruit_GFX.h> 
 #include <Adafruit_SSD1306.h> 
 #include <BH1750.h> 
  
 #define OLED_RESET 22 // GPIO22 
 Adafruit_SSD1306 display(OLED_RESET); 
  
 BH1750 light(0x23); 
  
 void setup() { 
   Serial.begin(115200); 
   Wire.begin(8, 10); 
   display.begin(SSD1306_SWITCHCAPVCC, 0x3C); 
 } 
  
 void loop() { 
   // Clear the buffer. 
   display.clearDisplay(); 
   display.setTextSize(1); 
   display.setCursor(40, 10); 
   display.setTextColor(WHITE); 
  
   if (light.begin(BH1750::CONTINUOUS_HIGH_RES_MODE)) { 
     display.println("Light: "); 
     display.setTextSize(1); 
     display.setCursor(40, 21); 
     display.print(light.readLightLevel()); 
   } else { 
     display.println("Error!"); 
   } 
   display.display(); 
   delay(1000); 
 }

Credits

TIMOTHY MWALA

TIMOTHY MWALA

15 projects β€’ 11 followers
SmartHome Nerd

Comments