 //FLAGS -- Mainloop
 int flag_check_ldr =  0;
 int flag_check_5v_brownout = 1;
-int flag_check_12v_brownout = 0;
+int flag_check_12v_brownout = 1;
 
 // FLAGS -- Status
 int flag_5v_brownout_detected = 0;


//THRESHOLDS
int threshold_12v = 700; //#CHANGE
int threshold_5v = 700; //#CHANGE
int threshold_ldr = 512;

//Pin Definitions
char pin_5v_brownout = A3;
char pin_12v_brownout = A4;
char pin_ldr_1 = A1;
char pin_ldr_2 = A2;
int pin_relay_5v = 6;
int pin_relay_12v = 7;


void check_for_5v_brownout(){
	// This function is used to check for stable 5 Volts
	input_5v = analogRead(pin_5v_brownout);
	// if(flag_5v_brownout_detected == 0){
	// 	// CHANGE LATER (to ensure actual brownout and not a minor fluctuation)

	Serial.println(input_5v);
	delay(500);

	// if(input_5v<threshold_5v){
	// 	turn_on_backup_battery();
	// 	flag_5v_brownout_detected = 1;
	// }
	// else{
	// 	// turn_off_backup_battery();
	// 	flag_5v_brownout_detected = 0;
	// }


	// 	if(input_5v<threshold_5v){
	// 		turn_on_backup_battery();
	// 		flag_5v_brownout_detected = 1;
	// 	}
	// }
	// else{
	// 	if(input_5v>threshold_5v){
	// 		turn_off_backup_battery();
	// 		flag_5v_brownout_detected = 0;
	// 	}
	// }	
}

void check_both_ldr(){
