Bhuvanesh Nick
Member level 1
- Joined
- Aug 22, 2013
- Messages
- 33
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Activity points
- 201
int x=0;
void setup()
{
Serial.begin(14400);
Serial.print("starting");
Serial.println("Program");
pinMode(13,OUTPUT);
pinMode(7,INPUT);
digitalWrite(7,HIGH);//internal pull up
}
void loop()
{
if(digitalRead(7)==0)
{
x=!x;
digitalWrite(13,x);
while(digitalRead(7)==0);
delay(50);//debounce of the spring action of switch
Serial.print(x);
}}
once i press the button its blowing.but next time time when i press its blowing off how is that
void setup()
{
Serial.begin(14400);
Serial.print("starting");
Serial.println("Program");
pinMode(13,OUTPUT);
pinMode(7,INPUT);
digitalWrite(7,HIGH);//internal pull up
}
void loop()
{
if(digitalRead(7)==0)
{
x=!x;
digitalWrite(13,x);
while(digitalRead(7)==0);
delay(50);//debounce of the spring action of switch
Serial.print(x);
}}
once i press the button its blowing.but next time time when i press its blowing off how is that