Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int LiczDio=0;
- int RodzL1=0, RodzL2=0, RodzL3=0;
- int WybranaDioda;
- int DiodaL1=0,DiodaL2=0,DiodaL3=0;
- void Konfiguracja(){
- if(!(przycisk2))
- WybranaDioda++;
- while(!(przycisk2));
- if(WybranaDioda%3==0){
- if(!(przycisk3))
- RodzL1++;
- while(!(przycisk3));
- if(RodzL1%3==0){
- zapal(1);
- zgas(3);
- }
- if(RodzL1%3==1){
- zgas(1);
- zgas(3);
- }
- if(RodzL1%3==2){
- zgas(3);
- migaj(30000,1);
- }
- }
- if(WybranaDioda%3==1){
- if(!(przycisk3))
- RodzL2++;
- while(!(przycisk3));
- if(RodzL2%3==0){
- zapal(2);
- zgas(1);
- }
- if(RodzL2%3==1){
- zgas(2);
- zgas(1);
- }
- if(RodzL2%3==2){
- zgas(1);
- migaj(30000,2);
- }
- }
- if(WybranaDioda%3==2){
- if(!(przycisk3))
- RodzL3++;
- while(!(przycisk3));
- if(RodzL3%3==0){
- zapal(3);
- zgas(2);
- }
- if(RodzL3%3==1){
- zapal(3);
- zgas(2);
- }
- if(RodzL3%3==2){
- zgas(2);
- migaj(30000,3);
- }
- }
- }
- void Pracuj(){
- if(!(przycisk2))
- DiodaL1++;
- while(!(przycisk2));
- if(!(przycisk3))
- DiodaL2++;
- while(!(przycisk3));
- if(!(przycisk4))
- DiodaL3++;
- while(!(przycisk4));
- if(DiodaL1%2==0){
- if(RodzL1%3==0)
- zapal(1);
- if(RodzL1%3==1)
- zgas(1);
- if(RodzL1%3==2)
- migaj(30000,1);
- }
- else
- zgas(1);
- if(DiodaL2%2==0){
- if(RodzL2%3==0)
- zapal(2);
- if(RodzL2%3==1)
- zgas(2);
- if(RodzL2%3==2)
- migaj(30000,2);
- }
- else
- zgas(2);
- if(DiodaL3%2==0){
- if(RodzL3%3==0)
- zapal(3);
- if(RodzL3%3==1)
- zgas(3);
- if(RodzL3%3==2)
- migaj(30000,3);
- }
- else
- zgas(3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement