Go Down

Topic: still run functions while in delay (Read 880 times) previous topic - next topic

hilukasz

seem to have a problem that while a function is running which has some delays and digitally increments the brightness of an LED it seems I cannot run anything in between. is there a way to check for example, a button press, while something is in a delay or being incremented?
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Nick Gammon



hilukasz

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

hilukasz

#4
Mar 06, 2013, 06:21 am Last Edit: Mar 06, 2013, 06:23 am by hilukasz Reason: 1
ok since I am using an Unsigned Integer in this example which can hold a decent count (4,294,967,295) is that a concern of the program crashing? (this thing might be on for several days) Is there a standard practice of reseting the count when it gets to a certain value? that seems like the likely solution...
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Go Up