Line 28... |
Line 28... |
28 |
|
28 |
|
29 |
#define REVERS 3 // 3*256 ms = 0,75 s |
29 |
#define REVERS 3 // 3*256 ms = 0,75 s |
30 |
#define GO 117 // 117*256 ms = 30 s |
30 |
#define GO 117 // 117*256 ms = 30 s |
31 |
#define GO_ZALUZIE 6 // cca 1,5 s |
31 |
#define GO_ZALUZIE 6 // cca 1,5 s |
32 |
#define RECEIVE 10 // cca 2,6 s |
32 |
#define RECEIVE 10 // cca 2,6 s |
33 |
#define ZAKMIT 250 // pocet pruchodu hlavni smyckou pred opetovnou detekci prepnuti vypinace |
33 |
#define ZAKMIT 2000 // pocet pruchodu hlavni smyckou pred opetovnou detekci prepnuti vypinace |
34 |
|
34 |
|
35 |
#define OR110NU PIN_A0 // t1 Zaluzie koupelna dole |
35 |
#define OR110NU PIN_A0 // t1 Zaluzie koupelna dole |
36 |
#define OR110ND PIN_A1 // t2 |
36 |
#define OR110ND PIN_A1 // t2 |
37 |
#define OR207VU PIN_A2 // t3 Roleta klubovna |
37 |
#define OR207VU PIN_A2 // t3 Roleta klubovna |
38 |
#define OR207VD PIN_A3 // t4 |
38 |
#define OR207VD PIN_A3 // t4 |
Line 201... |
Line 201... |
201 |
} |
201 |
} |
202 |
|
202 |
|
203 |
void main() |
203 |
void main() |
204 |
{ |
204 |
{ |
205 |
char buf[10]; // Buffer pro prijem prikazu |
205 |
char buf[10]; // Buffer pro prijem prikazu |
206 |
unsigned int8 zakmity=0; // Osetreni zakmitu vypinacu |
206 |
unsigned int16 zakmity=0; // Osetreni zakmitu vypinacu |
207 |
|
207 |
|
208 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
208 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
209 |
setup_adc(ADC_CLOCK_DIV_2); |
209 |
setup_adc(ADC_CLOCK_DIV_2); |
210 |
setup_psp(PSP_DISABLED); |
210 |
setup_psp(PSP_DISABLED); |
211 |
setup_spi(SPI_SS_DISABLED); |
211 |
setup_spi(SPI_SS_DISABLED); |