Cov txheej txheem:

Siv Khawm rau ON & OFF Coj Nrog CloudX M633: 3 Cov Kauj Ruam
Siv Khawm rau ON & OFF Coj Nrog CloudX M633: 3 Cov Kauj Ruam

Video: Siv Khawm rau ON & OFF Coj Nrog CloudX M633: 3 Cov Kauj Ruam

Video: Siv Khawm rau ON & OFF Coj Nrog CloudX M633: 3 Cov Kauj Ruam
Video: COJ KHAWB 2024, Kaum ib hlis
Anonim
Siv Khawm rau ON & OFF Coj Nrog CloudX M633
Siv Khawm rau ON & OFF Coj Nrog CloudX M633

Koj puas paub tias koj tuaj yeem siv CloudX M633 los qhib lub LED thaum koj nias lub pob?

Hauv txoj haujlwm no kuv yuav qhia koj li cas koj tuaj yeem siv khawm ON thiab OFF Led. thaum koj nias lub pob coj yuav nyob, thaum koj nias nws dua cov coj yuav tawm.

Kauj Ruam 1: Cheeb Tsam

Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam

Tau txais tag nrho cov khoom siv no yog tias koj xav pib;

CloudX M633

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

  • CloudX SoftCard
  • V3 Kab
  • Coj
  • Khawm Hloov
  • Jumper Hlau
  • 10 k resistor
  • Cov qhob cij

Koj tuaj yeem tau txais koj cov khoom ntawm no

Kauj ruam 2: HARDWARE

HARDWARE
HARDWARE

ua raws qhov Circuit no

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 } } }

Pom zoo: