Use digitalRead on 2 ports HELP!
so want see serial.println both of ports (both of them ir sensors) can't figure out how.
code: [select]
int val = 0;
int pinone = 8;
int pintwo = 3;
void setup()
{
serial.begin(9600);
}
void loop()
{
val = digitalread(pinone,pintwo);
serial.println(val);
}
code: [select]
val = digitalread(pinone,pintwo);
read 1 pin , read other using different variables- don't try invent own syntax
Arduino Forum > Using Arduino > Programming Questions > Use digitalRead on 2 ports HELP!
arduino
Comments
Post a Comment