Thanks AWOL,
So something like this would work?
unsigned long pulseWidth = 0;
void setup()
{
 Serial.begin(57600);
 pinMode(8, INPUT);
Â
}
void loop()
{
 pulseWidth = pulseIn(8, HIGH);
 Serial.println(convert(pulseWidth), DEC);
Â
}
long convert(long pulseWidth)
{
 int value = pulseWidth - 1000;
 return constrain(map(value / 5, 0, 200, 0, 180), 0, 180);
}