Versuch mal statt dem == ein &

also nicht
Code:
if (sw == 0x01)
sondern
Code:
if (sw & 0x01)
MfG
backbone