Why won't this work?

I believe inside setup you need:

Serial.begin(baud)

Put

int val;

inside your loop.