/* PB5 ATTINY PIN1
PB3 ATTINY PIN2
PB4 ATTINY PIN3
PB0 ATTINY PIN5
PB1 ATTINY PIN6
PB2 ATTINY PIN7
*/
//#include "tinysnore.h"
#define wireLessOutput 3
//const int wireLessOutput = 0;
int count=0;
const int Buzzer = 1;
//int wirelessPower = ;
unsigned long Now = 0;
unsigned long sounder = 0;
unsigned long sleepTimerBlocker=0;
bool runOnce =true;
bool runOnce2=true;
bool runOnce3=true;
bool runOnce4=true;
bool buzzReady =false;
bool soundState=0;
bool prevsoundState=0;
bool buzzHigh=false;
bool step2=false;
bool BEEP=false;
bool sleepBlocker=false;
bool BEEPING_STARTED=false;
bool TOUCH_TEST_STATE=false;
int buzzerState=LOW;
int Count_To_three=0;
bool confirmationBeeps=false;
void setup() {
pinMode(Buzzer, OUTPUT);
pinMode(wireLessOutput, INPUT);
Serial.begin(9600);
Serial.println();
delay(500);
}
void loop() {
/*CODE IS WORKING*/
Now=digitalRead(pressed);
if(Now==LOW){
if(Now!=before){
if(nowLow==false){
nowLow=true;
theTimer=millis();
digitalWrite(pulse, LOW);
}
}
}
if(nowLow==true){
if(millis()-theTimer>=1500){
digitalWrite(pulse, HIGH);
nowLow=false;
}
}
Serial.println(nowLow);
before=Now;
}