Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
mellowyellow178
mellowyellow178's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Timing with mills()
[3 Replies]
08-Nov-2012 03:52 PM
Forum:
Programming Questions
Hi,
I am a beginner and I am having trouble with mills(), I have 16 ellipses or "lights" and I want to control when they appear at certain times and time in between etc but I just can't figure it out...
Hope someone can help!
Here is my code.
void setup() {
size(1000, 1000);
}
void light1() {
ellipse(200, 100, 55, 55);
}
void light2() {
ellipse(200, 300, 55, 55);
}
void light3() {
ellipse(200, 500, 55, 55);
}
void light4() {
ellipse(200, 700, 55, 55);
}
void light5() {
ellipse(400, 100, 55, 55);
}
void light6() {
ellipse(400, 300, 55, 55);
}
void light7() {
ellipse(400, 500, 55, 55);
}
void light8() {
ellipse(400, 700, 55, 55);
}
void light9() {
ellipse(600, 100, 55, 55);
}
void light10() {
ellipse(600, 300, 55, 55);
}
void light11() {
ellipse(600, 500, 55, 55);
}
void light12() {
ellipse(600, 700, 55, 55);
}
void light13() {
ellipse(800, 100, 55, 55);
}
void light14() {
ellipse(800, 300, 55, 55);
}
void light15() {
ellipse(800, 500, 55, 55);
}
void light16() {
ellipse(800, 700, 55, 55);
}
void draw () {
int startLoopTime = millis();
smooth();
background(0);
if (millis() < startLoopTime+1000) {
light2();
}
else {
light3();
}
}
«Prev
Next »
Moderate user : mellowyellow178
Forum