Mundarija:

CloudX M633: 3 qadam bilan Led ON va OFF tugmalaridan foydalanish
CloudX M633: 3 qadam bilan Led ON va OFF tugmalaridan foydalanish

Video: CloudX M633: 3 qadam bilan Led ON va OFF tugmalaridan foydalanish

Video: CloudX M633: 3 qadam bilan Led ON va OFF tugmalaridan foydalanish
Video: Best Music Mix 2023 🔥Gaming Music Mix ♫♫ NoCopyrightSounds [Remake 2023] 2024, Noyabr
Anonim
CloudX M633 bilan Led ON va OFF tugmalaridan foydalanish
CloudX M633 bilan Led ON va OFF tugmalaridan foydalanish

Siz tugmani bosganingizda LEDni yoqish uchun CloudX M633 -dan foydalanishingiz mumkinligini bilarmidingiz?

Ushbu loyihada men sizga LEDni yoqish va o'chirish tugmachalarini qanday ishlatishni ko'rsataman. tugmani bosganingizda chiroq yonadi, yana bosganingizda chiroq o'chadi.

1 -qadam: Komponent

Komponent
Komponent
Komponent
Komponent
Komponent
Komponent

Agar siz boshlamoqchi bo'lsangiz, ushbu komponentning barchasini oling;

CloudX M633

www.instructables.com/files/deriv/FP5/TFFN…>

  • CloudX SoftCard
  • V3 kabeli
  • LED
  • Tugma tugmasi
  • Jumper simlari
  • 10 k qarshilik
  • Non paneli

Bu erda siz komponentni olishingiz mumkin

2 -qadam: QURILMA

QURILMA
QURILMA

ushbu sxemaga amal qiling

step 3: coding

copy this code to your cloudx m633

#include

#define bulb pin1

#define button pin2 bit flag; setup(){ //setup here pinmode(1, output); pinmode(2, input);

bulb = low;

loop(){

//program here if(button == 0 && bulb == low){ delayms(250); bulb = high; // turn on digital pin 1 } if(button == 0 && bulb == high){ delayms(250); bulb = low; // turn off digital pin 1 } } }

Tavsiya: