pin state is not the same as pin value

fixes this issue: https://github.com/jgautier/firmata/issues/39