Question about serial
hello,
i have question serial communication, or digitalread.
whenever apply power input 8 in serial monitor shows it, when take out sticks around few seconds. not happen when apply power it, when take away power.
i grateful if me.
- manofpanda
i have question serial communication, or digitalread.
code: [select]
int input8 = 8;
void setup(){
serial.begin(9600);
pinmode(input8, input);
}
void loop(){
int i8a = digitalread(input8);
serial.println(i8a);
delay(10);
}
whenever apply power input 8 in serial monitor shows it, when take out sticks around few seconds. not happen when apply power it, when take away power.
i grateful if me.
- manofpanda
dc have pull down resistor between pin , ground. if not digital pin "floating" when disconnected , state undefined. have dfininate state pin must connected either +v or ground. resistor can 1k 10k.
Arduino Forum > Using Arduino > Project Guidance > Question about serial
arduino
Comments
Post a Comment