2 This program is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Affero General Public License as
4 published by the Free Software Foundation, either version 3 of
5 the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU Affero General Public License for more details.
12 You should have received a copy of the GNU Affero General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 pinMode(red0
, OUTPUT
);
25 pinMode(red1
, OUTPUT
);
26 pinMode(yellow0
, OUTPUT
);
27 pinMode(yellow1
, OUTPUT
);
28 pinMode(green0
, OUTPUT
);
29 pinMode(green1
, OUTPUT
);
33 digitalWrite(led
, HIGH
);
37 digitalWrite(led
, LOW
);
40 void ons_offs(int* ons
, int onsc
,
44 for(ii
= 0; ii
< offsc
; ii
++) {
47 for(ii
= 0; ii
< onsc
; ii
++) {
55 int yellow_wait
= 800;
56 int green_wait
= 1600;
58 ons_offs((int[]){red0
, green1
}, 2,
59 (int[]){yellow0
, green0
, red1
, yellow1
}, 4,
62 ons_offs((int[]){red0
, yellow1
}, 2,
63 (int[]){yellow0
, green0
, red1
, green1
}, 4,
66 ons_offs((int[]){red0
, red1
}, 2,
67 (int[]){yellow0
, green0
, yellow1
, green1
}, 4,
70 ons_offs((int[]){green0
, red1
}, 2,
71 (int[]){red0
, yellow0
, yellow1
, green1
}, 4,
74 ons_offs((int[]){yellow0
, red1
}, 2,
75 (int[]){red0
, green0
, yellow1
, green1
}, 4,
78 ons_offs((int[]){red0
, red1
}, 2,
79 (int[]){yellow0
, green0
, yellow1
, green1
}, 4,