rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi

DOCX 3 стр. 523,9 КБ Бесплатная загрузка

Предварительный просмотр (3 стр.)

Прокрутите вниз 👇
1 / 3
topshiriq maqsadi: rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi const int pingpin = 7; const int red=11; const int blue=10; int green=9; void setup() { // initialize serial communication: serial.begin(9600); pinmode(red,output); pinmode(blue,output); pinmode(green,output); } void loop() { // establish variables for duration of the ping, and the distance result // in inches and centimeters: long duration, inches, cm; // the ping))) is triggered by a high pulse of 2 or more microseconds. // give a short low pulse beforehand to ensure a clean high pulse: pinmode(pingpin, output); digitalwrite(pingpin, low); delaymicroseconds(2); digitalwrite(pingpin, high); delaymicroseconds(5); digitalwrite(pingpin, low); // the same pin is used to read the signal from the ping))): a high pulse // whose duration is the time (in microseconds) from the sending of the ping // to the reception of its echo off of an object. pinmode(pingpin, input); duration = pulsein(pingpin, high); // convert the time into a distance inches = microsecondstoinches(duration); …
2 / 3
we // take half of the distance travelled. return microseconds / 29 / 2; } image1.png image2.png image3.png
3 / 3
rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi - Page 3

Хотите читать дальше?

Скачайте все 3 страниц бесплатно через Telegram.

Скачать полный файл

О "rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi"

topshiriq maqsadi: rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi const int pingpin = 7; const int red=11; const int blue=10; int green=9; void setup() { // initialize serial communication: serial.begin(9600); pinmode(red,output); pinmode(blue,output); pinmode(green,output); } void loop() { // establish variables for duration of the ping, and the distance result // in inches and centimeters: long duration, inches, cm; // the ping))) is triggered by a high pulse of 2 or more microseconds. // give a short low pulse beforehand to ensure a clean high pulse: pinmode(pingpin, output); digitalwrite(pingpin, low); delaymicroseconds(2); digitalwrite(pingpin, high); delaymicroseconds(5); digitalwrite(pingpin, low); // the same pin is used to read the signal from the ping))): a high pulse //...

Этот файл содержит 3 стр. в формате DOCX (523,9 КБ). Чтобы скачать "rgb-yorug‘lik diodi. impuls kengligining modulyatsiyasi", нажмите кнопку Telegram слева.

Теги: rgb-yorug‘lik diodi. impuls ken… DOCX 3 стр. Бесплатная загрузка Telegram