I'm working on my first Arduino project (a robotic penguin) and was looking at the code (will post link below; I'm new here so my first message apparently can't contain links) for reference. I'm trying to figure out how to receive values from a transmitter. We're trying to do this with two channels, so I need to adjust the line below for the second pin.
Most of the code makes perfect sense, I got a friend to explain interrupts to me, etc. There is, however, one line I can't figure out.
define int0 (PINE & 0b00010000) // Faster than digitalRead
From looking around, it seems like this is the "assembly language" version of digitalRead, which is cool. What's confusing me is that further down in the code, it's setting pinMode(2,INPUT) and we're only putting the transmitter into pin 2 - but I can't wrap my mind around how the line above would represent pin 2 (since 0b00010000 would seem to be 16 in binary); and how to make it represent pin 3 instead (for the second channel of the transmitter with the second interrupt).
I've googled, looked at the source code, searched the forums, etc. for the past 2 days and can't figure it out, so I thought I'd ask. I'm new to Arduino/C++ syntax, though I've been contributing to open source projects (mostly Fedora, doing release management and programming largely in Python) for the past 3 years - I'll also try asking on IRC, now that I can reference this post to describe my problem quickly.
Thanks for your time,