Как уменьшить в "размерах" все это безобразие))?
- Войдите на сайт для отправки комментариев
Чт, 31/07/2014 - 14:38
/* объявляю контакты */ const int str[] = {22, 23, 24, 25, 26, 27, 28}; // + anod const int rad[] = {30, 31, 32, 33, 34, 35}; // - catod void setup(){ // Инициализируем порты как выходные pinMode(22, OUTPUT); pinMode(23, OUTPUT); pinMode(24, OUTPUT); pinMode(25, OUTPUT); pinMode(26, OUTPUT); pinMode(27, OUTPUT); pinMode(28, OUTPUT); pinMode(30, OUTPUT); pinMode(31, OUTPUT); pinMode(32, OUTPUT); pinMode(33, OUTPUT); pinMode(34, OUTPUT); pinMode(35, OUTPUT); } void loop(){ ////////////////////////////STR 1///////////////////////////// //sv0 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, LOW); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str1///////////////////////////// digitalWrite(22, 1); digitalWrite(23, 0); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv3 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv4 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv5 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); /////////////////////////////////////////////////////////////// ////////////////////////// STR 2 /////////////////////////////// //sv5 2str////////////////////////////////////////////////////// digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); //sv4 2str digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv3 2 str digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 2str digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 2str digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str2 digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); ///////////////////////// STR3 ////////////////////////////// //sv0 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv3 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv4 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv5 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); ///////////////////////// STR 4 /////////////////////////////// //sv5 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); //sv4 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv3 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); /////////////////////////// STR 5 ////////////////////////////// //sv0 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv3 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv4 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv5 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); /////////////////////////// STR 6 //////////////////////////// //sv5 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); //sv4 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv3 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); ////////////////////////// STR 7 //////////////////////////// //sv0 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv3 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv4 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv5 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); /*Бегут по кругу огни*/ //sv4 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv3 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str7 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 1); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str6 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 1); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str5 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 1); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str4 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 0); digitalWrite(25, 1); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str3 digitalWrite(22, 0); digitalWrite(23, 0); digitalWrite(24, 1); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 str2 digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 0); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv0 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, LOW); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv1 str1///////////////////////////// digitalWrite(22, 1); digitalWrite(23, 0); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 0); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv2 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 0); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv3 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 0); digitalWrite(34, 1); digitalWrite(35, 1); delay(200); //sv4 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 0); digitalWrite(35, 1); delay(200); //sv5 1str digitalWrite(22, HIGH); digitalWrite(23, LOW); digitalWrite(24, LOW); digitalWrite(25, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); digitalWrite(28, LOW); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); //sv5 2str////////////////////////////////////////////////////// digitalWrite(22, 0); digitalWrite(23, 1); digitalWrite(24, 0); digitalWrite(25, 0); digitalWrite(26, 0); digitalWrite(27, 0); digitalWrite(28, 0); digitalWrite(30, 1); digitalWrite(31, 1); digitalWrite(32, 1); digitalWrite(33, 1); digitalWrite(34, 1); digitalWrite(35, 0); delay(200); }
Циклами. На сайте есть справочник по языку, смотрите for.
Вот это да! На 12 пинов 1000 строк кода! Респект :)
http://tronixstuff.com/2011/10/22/tutorial-arduino-port-manipulation/
Манипулируй портом. Один удар и восемь дырок :)
По той же ссылке дядя рассказывает, как это намного быстрее чем digitalWrite, так что выигрыш.
http://tronixstuff.com/2011/10/22/tutorial-arduino-port-manipulation/
Манипулируй портом. Один удар и восемь дырок :)
По той же ссылке дядя рассказывает, как это намного быстрее чем digitalWrite, так что выигрыш.
Отличный материал, спасибо.