Project showcase
LED light sensor

LED light sensor © GPL3+

Light in - light out

  • 14 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Code

Untitled fileArduino
int i = 0;
int t = 0;

void findAv(int a, int b, int c, int d, int e, int f) {
  
  int av = ((a+b+c+d+e+f)/6);
  
  t = av;
  
}

void setup() {
  
  pinMode(6, OUTPUT);
  
}

void loop() {
  
  findAv(analogRead(0), analogRead(1), analogRead(2), analogRead(3), analogRead(4), analogRead(5));
  
  if(t > 1000) {
    
    t = (t - 50);
    
  }
  
  analogWrite(6, t);
  
}

Schematics

av_light_sensor_led_Ol6xIJdwEs.fzz
av_light_sensor_led_Ol6xIJdwEs.fzz

Comments

Similar projects you might like

Ambient Light Sensor Using Photo Resistor and LED Lights!

Project tutorial by DCamino

  • 3,372 views
  • 4 comments
  • 17 respects

LED as a Light Sensor

Project tutorial by WolfxPac

  • 2,299 views
  • 8 comments
  • 19 respects

Controlling LED light intensity using smartphone light senso

Project tutorial by Nikola Travis

  • 1,845 views
  • 0 comments
  • 3 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 17,299 views
  • 4 comments
  • 34 respects

RobotGeek PIR Motion Sensor Night Light

Project tutorial by RobotGeek Projects Team

  • 1,578 views
  • 1 comment
  • 6 respects
Add projectSign up / Login