Harvesting electricity from CO2