I was just about to connect up a 9V battery (via voltage divider) to VIN and GND to test how long it will run on the battery alone but I noticed that there are 7 VIN pins on the pyboard. Does it matter which VIN I choose to connect the battery?
Edit: I found a video of someone using the VIN next to pin X1, so I tried it but the pyboard did not power up. I'm believe my resistors on the voltage divider were too large (R1=R2=10k). How many mA are required to power the pyboard? Using the 9V battery and 500 Ohm resistors I can supply 9mA at 4.5V.
Thanks
VIN pin question
Re: VIN pin question
A resistor voltage divider is not an appropriate way to reduce the voltage from a 9V battery to the pyboard; the voltage that you get out of the resistor divider will be highly dependent on the amount of current that you draw.
The correct way to bring the voltage down is to use a regulator, of which several different types exist. However, strictly speaking you don't even need that, because the pyboard has an onboard regulator (the MCP1802/3.3V) to bring the 5V USB power down to the 3.3V needed by the processor. The regulator can nominally accept an input of up to 10V, so connecting a 9V battery directly should be fine.
Do note that this will be fairly inefficient: the MCP1802 is a linear regulator, meaning that if it is supplying 100mA at 3.3V, then it is drawing 100mA at 9V and wasting 570mW of power for the 330mW it is providing. If you are concerned about efficiency - and if you are running on battery power you should be
- it would be much more efficient to supply the pyboard with 4.5V from 3 AA batteries. Alternately, you could get an integrated switching regulator (possibly like the 3.3V version of this one from Recom Power, also available from Digi-Key) to produce the 3.3V to supply the processor directly from a wide range of input voltages.
-Bryan
Edit to add: The VIN pins are all connected together, it does not matter which one of them you use.
Edit again:
BTW, I'm an EE, not a programmer. I probably can't help you that much with your Python
The correct way to bring the voltage down is to use a regulator, of which several different types exist. However, strictly speaking you don't even need that, because the pyboard has an onboard regulator (the MCP1802/3.3V) to bring the 5V USB power down to the 3.3V needed by the processor. The regulator can nominally accept an input of up to 10V, so connecting a 9V battery directly should be fine.
Do note that this will be fairly inefficient: the MCP1802 is a linear regulator, meaning that if it is supplying 100mA at 3.3V, then it is drawing 100mA at 9V and wasting 570mW of power for the 330mW it is providing. If you are concerned about efficiency - and if you are running on battery power you should be

-Bryan
Edit to add: The VIN pins are all connected together, it does not matter which one of them you use.
Edit again:
Not exactly true: the resistor divider itself will draw 9mA from the battery when no current is drawn from the midpoint of the divider. As soon as you draw any current from the midpoint, the voltage at the midpoint will drop, until you are drawing a maximum of 18mA at 0 Volts. If you are drawing 9mA, then the voltage at the midpoint will be 2.25V.Using the 9V battery and 500 Ohm resistors I can supply 9mA at 4.5V.
BTW, I'm an EE, not a programmer. I probably can't help you that much with your Python

Re: VIN pin question
thanks Bryan, I'm using 3 AA now. 
