Hi , How are you every body, I need your helps please. I have small project and this the first time use PIC and I realy need your helps to program the PIC16F84 by C language. I'll be appreciate for this help.
Disceiption:
I want to control 3 lamps inside a room according to the number of the person who enters or exit from the room,I have 2 infrared sensors, when someone cut one of the two signals the microcontroller will account how many time the signal already cut. one IR will be to account how many person entered to the room and the other IR to account how many person exit of the room.
Methodology:
1- enter the room
1 person to 3 persons: turn on 1 lamp
4 persons to 5 persons: turn on 2 lamps
6 persons and above : turn on 3 lamps
2- exit of the room
for example the current state is 6 persons inside the room
1 t0 2 persons exit: turn on 2 lamps
3 to 5 persons exit: turn on 1 lamp
I'm waiting your reply as soon as posible
thank you
Morad
lighting control (help plaese) to every one
Are the "Enter" and "Exit" points of the room not separated? If not, you can not tell the difference.idakota wrote:but how do you tell if a 1 is someone entering or leaving?
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Hi morad21,
Anton
That is correct. The forum is here to help people when they get blocked by a problem and to share ideas. When you post some code so that they (we) can see what you did or didn't understand, we can then they to help you.morad21_9 wrote:I thought this forum to share knowledge and help people not to sale it. but!! how does it cost ?
Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)