At first I wanted to say that you should use the first law of thermodynamics. However both $P$, $V$ and $T$ are unknown if you would add a certain amount energy to an atmosphere.

I agree with udiboy that you should threat the atmosphere as an non-viscous fluid, which allows you to determine the pressure as a function of altitude. However for this to give an unique solution you still need to make some more assumptions, such as the temperature distribution, the molar mass of the gas, how fast the planet and atmosphere are rotating, ect.

Combined gas law in an open atmosphere
I have a color sensor from the original lego mindstorms set. I have had a hard time finding any reliable specs on the thing, but I did find somebody who has reverse engineered it quite a bit here. The thing only has two connectors though. I am not very good at circuits, but I would like to hook this up to my arduino and read values from it. Does this appear possible? If so, do you have any idea which pins to use, or what kind of code I need?
