@bishopuniverse and @Brungle, there are two parts to your solution. The first is how to power the core from the 12V battery. This can be done a few ways: with an efficient “step-down” switching regulator like this Polulu unit or using a cigarette lighter USB phone charger adapter with a suitable USB cable. Both provide 5V to the Core. There are lots of other ways but you need to find the one you feel most comfortable with implementing.
The second part of the solution is monitoring the battery voltage (up to 15V) with the max 3.3V analog input of the Core. You can do that using a voltage divider to step the higher voltage down to a max of 3.3V.
battery V+ -------R1----+----- A0 (Spark)
battery GND -------------+
R1 = 120K, R2 = 33K
With decent (1%) resistor, at 15V the analog input of the Core will be 3.235 volts. So, where you would read the analog voltage at A0 in your code, you would apply a ratio to calculate the equivalent battery voltage. The Core has a 12bit ADC so at 3.3V, the ADC value will be 4095. This gives a voltage-per-bit of 3.3v/4095.
const float voltsPerBit = 3.3 / 4095; // Calculate volts per bit of ADC reading
const float ratioV = (120000 + 33000) / 33000; //Calculates to 4.636363
int rawVolts = analogRead(A0) * voltsPerBit; //Calculate voltage at A0 input
batteryVolts = rawVolts * ratioV;
At the typical battery voltage of 13.8V, you will get 2.976 volts at input A0 and an analogRead() value of about 3693. This makes rawVolts = 3693 * (3.3 / 4095) = 2.976 and batteryVolts = 2.976 * (120000 + 33000) / 33000 = 13.8. Hope that helps!
I hope that helps