Occasionally I see:
define WIFLY_GPIO6 76
int i = digitalRead(WIFLY_GPIO6);
or something similar, where digitalRead's parameter is not a "real" pin number.
These lines are from a library designed to communicate with a RovingNetworks Wifly module, it is connected to the Arduino only via pins 10 and 11 and communicates with SoftwareSerial.
What's going on here? What use are pin numbers greater than the number of pins on the Arduino?
Thanks for the quick reply,
Must be some kind of leftover from testing the library. A digitalRead from this pin always seems to be 0, and the WiFly GPIO6 pin is not actually connected to anything according to the schematic of the shield.
BTW here is great tutorial for our readers on how all the pin mapping macros work:
The shield is the Seeed WiFi1.1 - it’s essentially a Roving Networks RN171 proto board, which is great little module with lots of interesting capabilites.
You will get more pins on a Mega that a UNO.
The "not real" pin number as you call it is when a pin number is a variable.