sadpony
Junior Member level 2
- Joined
- Jul 14, 2013
- Messages
- 22
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 227
Code:
int pinTx=12;
volatile int state=HIGH;
void setup()
{
pinMode(pinTx,OUTPUT);
attachInterrupt(0,tx,FALLING);
}
void loop()
{
digitalWrite(pinTx,state);
if(state==LOW)
{
delay(1000);
digitalWrite(pinTx,HIGH);
}
}
void tx()
{
state=LOW;
}
Last edited by a moderator: