Hydrogen, along with electrons energized by light, converts NADP into NADPH which is then used in the light-independent reactions. Oxygen gas diffuses out of the plant as a waste product of photosynthesis, and ATP is synthesized from ADP and inorganic phosphate. This all happens in the grana of chloroplasts.