Kapalı

home light automation controller

is any one familiar with Mbed Code

am writinga code that will turn my PIRsensor on and send an output to the mbed and the mbed will enable a power cord which will on my light

my challenge is that the light keep coming on and off after specified waiting time even when it is not sensing any motion

can one help me correct the code, see it below

#include "mbed.h"

DigitalOut myled(LED1);

DigitalOut ctrl(p8);

DigitalIn PIR(p20);

int main()

{

myled=0;

while(1)

{

if (PIR==1)

{

myled=1;

ctrl=1;

wait(10);

}

myled=0;

ctrl=0;

wait(10);

if (PIR==0)

{

myled=0;

ctrl=0;

}

}

}

Beceriler: C Programlama

Daha fazlasını görün: light challenge, int power, c programming power, c# programming challenge, c programming challenge, challenge programming, c# code challenge, automation programming, sensing, PIR, cord, motion controller, home automation code, code light automation, programming control light home automation, mbed home automation, code home automation, code automation, arduino home automation light switch, arduino connect light home, programming home automation, home automation programming, p8, work home software tester part time 2009, work home software tester part time

İşveren Hakkında:
( 0 değerlendirme ) Canada

Proje NO: #4414974

9 freelancer bu iş için ortalamada 381$ teklif veriyor

spcinc

Dear sir! I can provide perfect solution immediately. I'm ready.

in 0 gün içinde350$ USD
(7 Değerlendirme)
5.7
aapS0ftware

I can do it

in 3 gün içinde800$ USD
(6 Değerlendirme)
3.1
ZiedanStein

Hello sir, i am ready to help you as i have the solution, also i can do it cheaper than offered sir hope to work with you Best Regards

in 0 gün içinde275$ USD
(1 Değerlendirme)
1.1
heapau

Please check your PM!

in 3 gün içinde250$ USD
(0 Değerlendirme)
0.0
wasimarshad88

i am ready to start

in 3 gün içinde500$ USD
(0 Değerlendirme)
0.0
au3

Can help you with your project.

in 0 gün içinde275$ USD
(0 Değerlendirme)
0.8
prabhuvd

I can meet your requirement immediately.

in 0 gün içinde251$ USD
(0 Değerlendirme)
0.0
tousifbasheer

Am interested!!! PM me.

in 3 gün içinde550$ USD
(0 Değerlendirme)
0.0
Phalt

Hi! I have strong experience in embedded C programming! Please, read the PM.

1 gün içinde 275$ USD
(0 Değerlendirme)
0.0
kasilisoft

I am sure that i can deliver the solution with quality on time !!

in 2 gün içinde250$ USD
(0 Değerlendirme)
0.0