brian25
Member level 2
- Joined
- Feb 18, 2013
- Messages
- 52
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,288
- Activity points
- 1,601
int pinA = 11;
int pinB = 12;
int val;
void setup()
{
pinMode(pinA, OUTPUT);
pinMode(pinB, INPUT);
}
void loop()
{
int();
}
void int()
{
val=digitalRead(pinB); // read data
if(pinB == HIGH)
{
Serial.println("PINA ON"); //write serially
}
else if(pinB == LOW)
{
Serial.println("PinA OFF"); //write serially
}
}
the message is keep repeating. how to stop the message in serial monitor even the pin is still in continuous active high or low status. it's just a one time message.
int pinB = 12;
int val;
void setup()
{
pinMode(pinA, OUTPUT);
pinMode(pinB, INPUT);
}
void loop()
{
int();
}
void int()
{
val=digitalRead(pinB); // read data
if(pinB == HIGH)
{
Serial.println("PINA ON"); //write serially
}
else if(pinB == LOW)
{
Serial.println("PinA OFF"); //write serially
}
}
the message is keep repeating. how to stop the message in serial monitor even the pin is still in continuous active high or low status. it's just a one time message.