#include //Öâåòîìóçèêà Dll Scaner Twin disco line // //**************************** // Âèâîäè âèõîäè íà øàãîâèå äâèãàòåëè #define MIC A0 int vivod2 = 2; //Óïðàâëåíèå öâåòíèå çåðêàëà int vivod3 = 3; //Óïðàâëåíèå öâåòíèå çåðêàëà int vivod4 = 4; //Óïðàâëåíèå öâåòíèå çåðêàëà int vivod5 = 5; //Óïðàâëåíèå öâåòíèå çåðêàëà //******************************************* int vivod8 = 8; //Óïðàâëåíèå çåêàëî âíåøíåå int vivod9 = 9; //Óïðàâëåíèå çåêàëî âíåøíåå int vivod10 = 10; //Óïðàâëåíèå çåêàëî âíåøíåå int vivod11 = 11; //Óïðàâëåíèå çåêàëî âíåøíåå //Óïðàâëåíèå çàäåðæêîé int pausem1 = 5; int pausem2 = 6; int pausem3 = 5; int var = 0; int var1 = 0; int sig = 0; int val = 0; int val_1 = 0; void setup() { pinMode(vivod2, OUTPUT); pinMode(vivod3, OUTPUT); pinMode(vivod4, OUTPUT); pinMode(vivod5, OUTPUT); //Äâèãàòåëü ¹2 pinMode(vivod8, OUTPUT); pinMode(vivod9, OUTPUT); pinMode(vivod10, OUTPUT); pinMode(vivod11, OUTPUT); } void prog1() { //ïðîãðàììà 1 sig = analogRead(MIC)*50; if (sig > 1800) { //************************************ digitalWrite(vivod2, HIGH); //1-C0-1 * digitalWrite(vivod8, HIGH); //1-C1-2* digitalWrite(vivod3, LOW); //1-C1-1 * digitalWrite(vivod9, LOW); //1-C1-2 * digitalWrite(vivod4, LOW); //1-C2-1 * digitalWrite(vivod10, LOW); //1-C1-2* digitalWrite(vivod5, LOW); //1-C3-1 * digitalWrite(vivod11, LOW); //1-C1-2* //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //2-C0-1 * digitalWrite(vivod8, LOW); //1-C1-2 * digitalWrite(vivod3, HIGH); //2-C1-1 * digitalWrite(vivod9, HIGH); //1-C1-2* digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 delay(pausem1); digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 delay(pausem1); //****************ðåâåðñ************************ digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 delay(pausem1); //*************************************** digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 delay(pausem1); //********************************************* digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem1); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 delay(pausem1); } } // ïðîãðàììà 2 //******************************* void prog2() { if (sig > 2500) { digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); } } // ïðîãðàììà 3 //******************************* void prog3() { if (sig > 3500) { digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem3); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem3); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem3); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem3); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem3); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem3); digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem3); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem3); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem3); } } void prog4(){ while (val < 400 ){ digitalWrite(vivod2, LOW); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, HIGH); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, LOW); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, HIGH); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); val++; } } void prog5() { if (sig > 28000) { val = 0; val_1 = 0; } } //************************************************** //**************prog6******************************* void prog6(){ while(val_1 < 200) { digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //***************************************//************************ digitalWrite(vivod2, HIGH); //1-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //1-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //1-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //1-C3-1 digitalWrite(vivod11, HIGH); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //2-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, HIGH); //2-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //2-C2-1 digitalWrite(vivod10, HIGH); //1-C1-2 digitalWrite(vivod5, LOW); //2-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //3-C0-1 digitalWrite(vivod8, LOW); //1-C1-2 digitalWrite(vivod3, LOW); //3-C1-1 digitalWrite(vivod9, HIGH); //1-C1-2 digitalWrite(vivod4, HIGH); //3-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, LOW); //3-C3 digitalWrite(vivod11, LOW); //1-C1 //******************************** delay(pausem2); digitalWrite(vivod2, LOW); //4-C0-1 digitalWrite(vivod8, HIGH); //1-C1-2 digitalWrite(vivod3, LOW); //4-C1-1 digitalWrite(vivod9, LOW); //1-C1-2 digitalWrite(vivod4, LOW); //4-C2-1 digitalWrite(vivod10, LOW); //1-C1-2 digitalWrite(vivod5, HIGH); //4-C3-1 digitalWrite(vivod11, LOW); //1-C1-2 delay(pausem2); val_1++; } } //*********************end********************** void loop(){ prog1(); prog2(); prog3(); prog4(); prog5(); prog6(); }