SAS-01 - Ինչպե՞ս միացնել LED լույսեր եւ աշխատացնել դրանք։

Post Reply
davbaghdasaryan
Posts: 101
Joined: Thu Apr 09, 2020 8:08 pm

SAS-01 - Ինչպե՞ս միացնել LED լույսեր եւ աշխատացնել դրանք։

Post by davbaghdasaryan »

How to connect LED lights and run them on
| Как подключить светодиоды и запустить их



Մենք կփորձենք Symotec arduino shield-ին միացնել լուսադիոդները եւ դրանք կառավարել «Mblock» ծրագրի օգնությամբ։
Մեզ անհրաժեշտ է՝
1) Symotec arduino shield,
2) Մակետային սալիկ (breadboard),
3) Ռեզիստորներ,
4) Լուսադիոդներ եւ լարեր։

Լուսադիոդները տեղադրում ենք կարճ ոտքերը դեպի աջ։ Այնուհետեւ ռեզիստորների միջոցով կարճ ոտքերից լուսադիոդները միացնում ենք breadboard-ի «-»-ին։ Հաջորդ քայլով breadboard-ի մինուսը լարով միացնում ենք Շիլդի «-»-ին (3-րդ գիծ)։ Լուսադիոդների «+»-ները (երկար ոտքերը) լարի միջոցով միացնում ենք D2-ին, այսինքն՝ D0-ին։ Մյուսները հաջորդաբար միացնում ենք D4-ին (D1), D7 (D2):

Screen Shot 2020-10-19 at 11.56.06.png
Screen Shot 2020-10-19 at 11.56.06.png (172.39 KiB) Viewed 20690 times

Շիլդը միացնում ենք համակարգին եւ ծրագրավորում այն։ «Devices» բաժնում «Add» հրամանի օգնությամբ ավելացնում ենք «Arduino nano»-ն։ «Events» բաժնից ընտրում ենք «when Arduino starts up» կոճակը, այնուհետ ընտրում ենք «forever» կոճակը, որ գործողությունը անդադար շարունակվի։
Առաջին լուսադիոդին, որը D2-ն էր, տալիս ենք, որ վառվի՝ «set digital pin 2 output as high»։ Մյուս 2-ին տալիս ենք չվառվեն՝ «set digital pin 4 output as low», «set digital pin 7 output as low»։ Սպասում ենք 1 վայրկյան։ Կրկնում ենք բլոկը, բայց արդեն վառվում է 2-րդ լուսադիոդը։ Սպասում ենք 1 վայրկյան։ Կրկնում ենք նույնը, բայց արդեն վառվում է 3-րդ լուսադիոդը։ Այս ամենը դնում ենք «forever» բլոկի մեջ, որ անընդհատ կրկնվի։

Screen Shot 2020-10-19 at 12.01.13.png
Screen Shot 2020-10-19 at 12.01.13.png (162.91 KiB) Viewed 20690 times

Այնուհետ միանում ենք «Connect» հրամանով, պատուհանում նշում ենք մեր «Arduino»-ն եւ սեղմում «Connect» կոճակը։ Վերբեռնում ենք ծրագիրը «Upload» հրամանով։ Հաջող ավարտից հետո տեսնում ենք արդյունքը։
Հավելյալ նյութեր

Last edited by davbaghdasaryan on Fri Oct 01, 2021 3:44 pm, edited 1 time in total.

davbaghdasaryan
Posts: 101
Joined: Thu Apr 09, 2020 8:08 pm

How to connect LED lights and run them on

Post by davbaghdasaryan »

We will try to connect the LEDs with the Symotec arduino shield and control them with the help of the “Mblock” program.
This requires:
1)Symotec arduino shield
2)breadboard
3)resistors
4)LEDs and wires

We place the LEDs with short legs in the right direction.Then connect the LEDs with the short legs to the “-“ of the breadboard with the help of resistors. The next step is to connect the breadboard minus with the shield “ - “ (3 line) with the help of a wire. Connect the “+”-s(long legs) of the LEDs with the D2- namely D0 through the wire.

Screen Shot 2020-10-19 at 12.10.12.png
Screen Shot 2020-10-19 at 12.10.12.png (143.86 KiB) Viewed 20596 times

Connect the shield to the computer and program it. We add the “Arduino nano” to the section “Devices” with the help of the “Add” command. Choose the “when Arduino starts up” button from the “Events” section, then the “forever” button to continue the operation uninterrupted.
We command for the first LED(D2) to be turned on with “set digital pin 2 output as high”. Then we command the other LEDs not to be turned on with “set digital pin 4 output as low” and “set digital pin 7 output as low”.Wait for 1 second. Repeat the block, but now the second LED is turned on. Wait for 1 second. Repeat the same: now the third LED is turned on. Put all this in the "forever" block to ensure the uninterrupted operation.

Screen Shot 2020-10-19 at 12.12.07.png
Screen Shot 2020-10-19 at 12.12.07.png (35.74 KiB) Viewed 20596 times

Then we need to connect with the “Connect” command. Mention the “Arduino” in the window and push the “Connect” button. Upload the program with the “Upload” command.
After a successful completion we can see the result.

See more:


davbaghdasaryan
Posts: 101
Joined: Thu Apr 09, 2020 8:08 pm

Как подключить светодиоды и запустить их

Post by davbaghdasaryan »

Мы попробуем к Symotec arduino shield-у подключить светодиоды и управлять ими с помощью программы "Mblock".
Нам необходимы:
1) Symotec arduino shield,
2) Макетная плата (breadboard),
3) Резисторы,
4) Светодиоды и провода.
Светодиоды устанавливаем короткими ножками вправо. Затем светодиоды с помощью резисторов через короткие ножки подключаем к "-"-у breadboard-а. Следующим шагом минус breadboard-а по проводу соединяем к "-"-у шилда (3-я линия). "+"-ы (длинные ножки) светодиодов по проводу соединяем к D2, то есть - к D0. Остальные последовательно подключаем к D4 (D1), D7 (D2).

Screen Shot 2020-10-19 at 12.10.12.png
Screen Shot 2020-10-19 at 12.10.12.png (143.86 KiB) Viewed 20595 times

Шилд подключаем к компьютеру и программируем его. В разделе "Devices" с помощью команды "Add" добавляем "Arduino nano". Из раздела "Events" выбираем кнопку "when Arduino starts up", затем выбираем кнопку "forever", чтобы действие непрерывно продолжалось.
Первому светодиоду, который D2, задаем, чтобы загорелся: "set digital pin 2 output as high". Другим двум задаем, чтобы не загорались: "set digital pin 4 output as low", "set digital pin 7 output as low". Ждем 1 секунду. Повторяем блок, но уже загорается второй светодиод. Ждем 1 секунду. Повторяем то же самое, но уже загорается третий светодиод. Все это помещаем в блок "forever", чтобы непрерывно повторялось.

Screen Shot 2020-10-19 at 12.12.07.png
Screen Shot 2020-10-19 at 12.12.07.png (35.74 KiB) Viewed 20595 times

Затем подключаемся с помощью команды "Connect", в окне указываем наш "Arduino" и нажимаем кнопку "Connect". Программу загружаем с помощью команды "Upload". После успешного завершения мы видим результат.

See more:


Post Reply