I've built a remote shutter for my DSLR using a NANO and HC-SR501 PIR device. The code I wrote runs perfectly. My problem is that I would ike to adjust the delay timings. I would also like to adjust the shot count, which is fixed at 8 shots within a FOR loop. Here is the relevant code. Thank you in advance.
jremington:
Please use code tags when posting code.
Why would that be a problem? Go ahead and adjust them.
Yes, and that's the problem. I'm using weatherproof mini toggle switches. How to adjust the delay and shot count using front panel toggles?
Believe me, I've tried everything. For example, I've tried this: delay(a); using an IF statement,and read the switch state, to determine the value of the variable, whih doesn't work. Interestingly, global variables aren't recognized within the IF/ELSE part of the code.
I'll poke around the forum and learn the appropriate method for embedding code snippets.
I've been an electrical engineer for close to 50 years. There is a very good chance that I understand things that you don't have a clue about. I've beeen in the electronics manufacturing industry before many of you have been born. A part of my responsibilities is to assist as needed on the factory floor. I don't ever recall being as rude to an associate as I have been here.
Learn something about Ice Cube Neutrino Labratory. The high voltage required by the PMT's? Thats me.
Thanks for nothing.
I wonder... Do I hold the record from my first post to being banned?
There is a very good chance that I understand things that you don't have a clue about.
No surprise there. Most of the people I have met know things that I don't have a clue about, and I will bet that the ones I forgot to ask have some surprises, too.
To your question (which might very cleverly have appeared in your first post):
How to adjust the delay and shot count using front panel toggles?
iceninephoto:
There is a very good chance that I understand things that you don't have a clue about.
A statement like needs to be handled with great care. It is a two-sided statement. The other side of it reads
"There is a good chance other folk understand things that I don't have a clue about"
The key skill for an experienced engineer is knowing how to put other people in the frame of mind where they are willing to fill the gaps in the experienced engineers knowledge.
iceninephoto:
There is a very good chance that I understand things that you don't have a clue about.
That's a true statement. Everyone I meet knows things that I don't. And I invariably know things that they don't.
Of course in many cases what those other people know are things I have absolutely no interest in.
iceninephoto:
Learn something about Ice Cube Neutrino Labratory. The high voltage required by the PMT's? Thats me.
And there's an excellent example of something I have no interest in. But if I do ever become interested, I'll try to remember who to ask.
But back to your original problem. How about posting one or two examples of the things you say you've tried and that don't seem to work together with descriptions of what exactly it is that they do? THAT would give us something we might actually be able to help with.