Untitled
4 years ago in Plain Text
# define GREEN 2
# define ORANGE 3
# define RED 4
# define Buzzer 5
# define Sensor A0
void setup(){
for (int i = 2; i < 6; i ++)
pinMode(i, OUTPUT);
Serial.begin(9600);
}
void loop()
{
int sensor_In = analogRead(A0);
Serial.println(sensor_In);
for (int i = 2; i < 6; i ++)
digitalWrite(i, LOW);
//status_Indicator()
}
/** void status_Indicator()
{
int sensor_In = analogPad(A0);
Serial.printIn(sensor_In);
if ( sensor_In >= )
{
digitalWrite(RED,HIGH);
digitalWrite(Buzzer,HIGH);
}
else if (sensor_In >= )
{
digitalWrite(ORANGE,HIGH);
} else
{
digitalWrite(GREEN,HIGH);
}
delay(10);
}
*/