Air quality sensing with arduino and imp...code problems

I am trying to get a serial input that is being recieved through the imp to a COSM node. However, with my code, even after I have declaered an output port in my code, it still says that I have no output ports when I try to connect the two nodes. In short, I can not get output ports in nodes to work with my code. Help! The code is below. Any suggestions?
hardware.uart12.configure(38400, 8, PARITY_NONE, 1, NO_CTSRTS);
local result = OutputPort(“air_quality”);
function readSerial() {
hardware.uart12.write(0xC0);
imp.sleep(0.1);
local result = hardware.uart12.read();
if (result == -1) {
server.show(“No data returned.”);
} else {
server.show(result);
}

imp.wakeup(300, readSerial);

}

imp.configure(“Serial RX”, [], []);
readSerial();

result.set(result);

On the imp configure line, don’t you need to specify an output?
http://devwiki.electricimp.com/doku.php?id=codebasicstructure

That will be it, yes.

imp.configure(“Serial TX”, [], [result]);

…should fix it. Note that only one result will be sent with the above code per run, but I suspect you know that!