Update SensorNode.c

Updated nested if statements, bit shifting