May 18, 2024, 04:33:14 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


3 PIRs and a bunch of stuff in a room

Started by Dackels, October 08, 2015, 08:01:44 AM

Previous topic - Next topic

Dackels

Hello All,

I was wondering if I could get some help with programming 2 HC-8+.  To start, this is what will be controlled in the room:

3 PIRs
5 Valves
4 LEDs(all doing the same thing)
1 Led, doing its own thing
4 speakers (2 AP16s using L and R to send audio in different spots of the room)

Currently I have two Prop1 controllers controlling everything.  Prop1(1) controls the single LED, 1 AP16 board, 2 PIRS and 3 valves.

PIR 1 on Prop1(1)

when motion is detected it turns off single LED and sends audio command to AP16(1), and sets off Valve 1-2, delayed Valve 3.

PIR 1 on Prop1(2)

When motion is detected, Valve 4 goes off, audio is sent to AP16(2) LEDs strobe(timed by for loop).

PIR 2 on Prop1(1)

When motion is detected, Valve 5 Goes off, audio command to AP16(1), and single Led turns back on.


My main reason for swapping the controllers is for better control over all the different items i have in the room and to learn how to program a new board.  Any help would be appreciated.

Thank you!

JonnyMac

October 08, 2015, 12:04:40 PM #1 Last Edit: October 08, 2015, 12:56:14 PM by JonnyMac
It would be very helpful to have functional information about the IO points. Writing good code starts with writing READABLE code, and generic IO points don't make code readable, the function of those IO points does.

Please give a functional description for

Valve 1
Valve 2
Valve 3
Valve 4
Valve 5
LED1
LED4x

Making the leap from the Prop-1 to the HC-8+ is going to be exciting (perhaps a little scary at first), but when you master the multi-core programming of the Propeller you will really enjoy it. I have a template that is ready to use for a variety of programs that use the HC-8+ coupled with the AP-16+; I will populate it with code to get you going once I know what your IO points do.

Q: Is there separation between the PIRs so that they go off in order? Is that the desire? (I'mg going on that assumption)

It would also be useful to see your Prop-1 programs to understand your timing requirements. You indicate when valves are turned on, but never how long they run.

The hardest part of getting help from another programmer is describing EXACTLY what you want with all the excruciating details. As I like to remind people, the root word of specification is SPECIFIC. :)
Jon McPhalen
EFX-TEK Hollywood Office