Simple DIY 8 Step Sequenzer by Minart (Arduino based)


Schematic

Download
8StepSequenzer.pdf
Adobe Acrobat Dokument 207.9 KB

Arduino Code

//Simple 8 Step Sequenzer by Minart 25.Nov.2018

 

int nextStep = 2;

 

void setup() {

  

  // definition of used outputs

  

  pinMode(2,OUTPUT); 

  pinMode(3,OUTPUT);

  pinMode(4,OUTPUT);

  pinMode(5,OUTPUT);

  pinMode(6,OUTPUT);

  pinMode(7,OUTPUT);

  pinMode(8,OUTPUT);

  pinMode(9,OUTPUT);  

  pinMode(10,OUTPUT);

 

}

 

void loop() {

 

 digitalWrite(nextStep,HIGH); // set firstStep

 delay(analogRead(2)); // tempo definition

if (analogRead(2) > 0 && nextStep < 10){ // condition

  nextStep++; // next step

  }

  else

  {

  nextStep = 2; // set loop 

  }

  digitalWrite(nextStep-1,LOW); // clear last step

}