hi there;
i got arduino mega adk , looks pinout adk different
http://forum.arduino.cc/index.php?topic=45329.0
my output is:
porte3: 0
digir5: 1
why?
thx
i got arduino mega adk , looks pinout adk different
http://forum.arduino.cc/index.php?topic=45329.0
code: [select]
void setup() {
// put setup code here, run once:
pinmode(5, input);
serial.begin(115200);
}
void loop() {
// put main code here, run repeatedly:
serial.print("porte3: ");
serial.println(bitread(porte, 3));
serial.print("digir5: ");
serial.println(digitalread(5));
}
my output is:
porte3: 0
digir5: 1
why?
thx
you current pin state pin registers, not port. input pin nothing connected can read high or low @ random - it's floating, pick noise environment antenna.
Arduino Forum > Using Arduino > Programming Questions > Pinout for Port Registers on Arduino Mega
arduino
Comments
Post a Comment