Timer prompted functions
in
Programming Questions
•
2 years ago
Hello all Processing Gurus. I like, may other people on this forum am starting with this amazing tool and need help with a project that is far to advanced for a beginner. (I know we should all start with something simple but its all so exciting)
Ok...
I am working on a binary multi platform work of art and have got an Arduino counting with LEDs up to 82 in binary.
I am planning on getting a website to also count in binary up to 82 over the course of 24 hours (17:34 minutes each step. 12:00am being binary number 1, through to 11:00pm being binary number 82.
The code I am after I hope will be easy and will work something like this:
void setup() {
background (255,255,255);
size (600,400);
}
void draw() {
for (int i = 7; i >= 0;i--) {
strokeWeight(2);
noFill();
stroke(255, 000, 000);
ellipse (500-(i*60),180,21,21);
at this time 00:00:00 {
stroke();
fill(255, 000, 000);
else fill(255,255,255);
ellipse (500-(i*60),180,20,20);
}
at this time 00:17:34 {
stroke();
fill(255, 000, 000);
else fill(255,255,255);
ellipse (500-(i*60),180,20,20);
}
at this time 00:32:02 {
stroke();
fill(255, 000, 000);
else fill(255,255,255);
ellipse (500-(i*60),180,20,20);
}
ect...
then after the 82 binary at 11:59:59 loop to beginning.
I hope this makes sense and I hope someone can help me. It would be greatly appreciated.
Thanks
1