Project

General

Profile

Revision e433afbc

IDe433afbccfd3d2ed2be0331d7aa922998d2a8294
Parent 4295e81e
Child e29e70eb

Added by gustavobica almost 7 years ago

-Gets for Temperature ,start/stop and plus/minus

View differences:

tpf/io.c
63 63
        *state=0;
64 64
        return 0;
65 65
    }
66
    uint8_t getTemperatureSwitch(uint8_t* state){
67
        
68
         if(digitalRead(TEMPERATURE_SWITCH)==HIGH)
69
        {
70
            *state=1;
71
            
72
        }else{
73
            *state=0;
74
        }
75
        return 0;
76
    }
77
    
78
     
79
uint8_t getPlusButton(uint8_t* state){  
80
    
81
    if(digitalRead(PLUS_BTN)==HIGH)
82
        {
83
            *state=1;
84
            
85
        }else{
86
            *state=0;
87
        }
88
        return 0;
89

  
90
}
91

  
92
uint8_t getMinusButton(uint8_t* state){
66 93
    
94
    if(digitalRead(MINUS_BTN)==HIGH)
95
        {
96
            *state=1;
97
            
98
        }else{
99
            *state=0;
100
        }
101
        return 0;
102
}
103

  
104
uint8_t getStartStop(uint8_t* state)
105
{
106
     if(digitalRead(START_STOP)==HIGH)
107
        {
108
            *state=1;
109
            
110
        }else{
111
            *state=0;
112
        }
113
        return 0;
114

  
115
}
67 116
    
68 117
    
69 118
    

Also available in: Unified diff