Thursday, 4 February 2010

looping almost controlled

I have developed a code to stop my previous loops with the help from the arduino forum.

HOWEVER, i can't control my loops with a trigger(time/ dial) as this part of code is in the " setup () " instead of the normal place in " void loop () ", this is where actions take place.

The code is as follows:

const int loopTimes = 10; //set Thee loop to cycle 10 times

void setup() {
// initialize the digital pin as an input: //normal proceedings in setup
pinMode(redled, OUTPUT);

for (int i = 0; i< style="font-weight: bold;"> set loop 1 to loop 10 times
for(int r=0; r<10; s="0;" style="font-weight: bold;">set loop 2 to loop 10 times
if(s<10) style="font-weight: bold;"> where it normally is!!


I'm still going to work on this but after spending a whole day trying, i feel i better get on with the other aspects of my project.

No comments:

Post a Comment