Factory Monitor
Dependencies: mbed
factory sense HQ
Diff: main.cpp
- Revision:
- 7:854af9ba3146
- Parent:
- 6:e8819487b352
- Child:
- 8:e417787cb2fa
--- a/main.cpp Tue Aug 25 13:39:32 2015 +0000 +++ b/main.cpp Tue Aug 25 14:25:05 2015 +0000 @@ -28,14 +28,12 @@ { // if the state has changed, check to see if it is a change from high to low or low to high if (sensorState == 1){ // if the current state is HIGH then increment the counter - if (a == Inputs){ lastSensorState[a] = sensorState;} - if (a == Outputs){ lastSensorState[a] = sensorState;} + lastSensorState[a] = sensorState; return sensorState; } else { // if the current state is LOW then ignore - if (a == Inputs){ lastSensorState[a] = sensorState;} - if (a == Outputs){ lastSensorState[a] = sensorState;} + lastSensorState[a] = sensorState; return zero; } } @@ -55,7 +53,7 @@ int main() { - int Values[3]; + int Values[2]; while(1)