Quote:
|
Originally Posted by dumbo
I would like to do it with a microcontroller.
Iam looking at buying the mirochip flash starter kit
to LEARN how too. if that would be a good choice?
|
I did look at some of the stuff on the
FLASH starter kit. It appears that you do program it in C. I couldn't find the documentation on actual programming things such as output/input, so you're on your own there, but the outline I gave you above should help.
(I hope)
Also, not sure on exactly what might be required in programs for it, but if you're lucky, you might just be about to have one file like this:
In the file called pir.c (just as an example, it could be anything)
Code:
// Here you could put in any '#include's which are required for input/output
// You'll have to find a manual to tell you what to do exactly
// Example: #include <example.h>
#define PIR_IS_TRIPPED pir_in == 1 // In place of the pir_in == 1 here, you would put
// whatever you need to do to determine if the pir is tripped
int main(int argc, char **argv) // What this is exactly depends somewhat on the compiler
// For instance, it might just be int main(void), instead
{
while(1)
{
if(PIR_IS_TRIPPED)
{
// Turn on outputs and wait approriate times.
// I'm not sure how'd you do this using your specific stuff.
}
}
return 1;
}
Quote:
|
Originally Posted by dumbo
I know this is real simple stuff for the people on this forum
Iam just a old man trying to stay with the times 
|
Well, simple might be an exageration...
And, yes, for all you forum police out there, I am aware I duplicated some of that code...

Don't bug me about it.
