rishi arora
Published © GPL3+

LED THRESHHOLD FREQUENCY

To touch the censor and the leds glow up buzzer rings up.

BeginnerProtip1 hour21
LED THRESHHOLD FREQUENCY

Things used in this project

Story

Read more

Schematics

clGI9mvTBgUNTx58bvnz.JPG

Code

LED_THRESHOLD_freq.ino

Java
int ledpin=8;
int threshold_value=400;



void setup() {
  Serial.begin(9600);
  pinMode(ledpin,OUTPUT);
  pinMode(buttonpin,OUTPUT);
  // put your setup code here, to run once:

}

void loop() {
 int sensorvalue=analogRead(A0);
 Serial.println(sensorvalue);
 if(sensorvalue>threshold_value)
 digitalWrite(ledpin,HIGH);
 delay(200);
 digitalWrite(ledpin,LOW);

 
 }
  // put your main code here, to run repeatedly:

Credits

rishi arora

rishi arora

11 projects • 4 followers

Comments