South Node Code - I'm tired...

Don't fix my code, but first sketch from scratch. Am I on right path? This is for security and safety. The magnet is a magnetic force lock, 600lbs. The strobes are police wacker juniors. Audio goes out through a tiny lil thing or my big horns thru a 20W class D board.

void setup() {
  // put your setup code here, to run once:
  // "PWM: 3, 5, 6, 9, 10, and 11.
  pinMode(2, INPUT_PULLUP); //South Door corner
  pinMode(3, INPUT_PULLUP); //South Bolt
  pinMode(4, INPUT_PULLUP); //S Window
  pinMode(5, INPUT_PULLUP); //Sliding Gate
  pinMode(6, INPUT_PULLUP); //Basement Door
  pinMode(7, INPUT_PULLUP); //1Bath (PWM)
  pinMode(8, INPUT_PULLUP); //Disconnected - can't solder a pin on Ard #1
  pinMode(9, INPUT_PULLUP); //Disconnected - can't solder a pin on Ard #1
  pinMode(10, INPUT_PULLUP); //Magnet Continuity check - loop back to ground
  pinMode(11, INPUT_PULLUP); //Magnet allignment input //Mill block...  Connect LATER
  pinMode(12, INPUT_PULLUP); //Magnet allignment input #2 //Connect LATER
  pinMode(A2, INPUT); //Magnetic lock on?
  
  // OUTPUTs are on flip side of board
  pinMode(13, OUTPUT); //Strobe Relay
  pinMode(A3, OUTPUT); //Speaker / Horn Amp (PWM) tone() interferes with PWM output, doesn't need PWM pin
  pinMode(A6, OUTPUT); // Audio output gain (via PNP Q and capacitor to remove DC Bias)

  int IN_door_s = 2;
  int IN_bolt_s = 3;
  int IN_window_s = 4;
  int IN_gate_s = 5;
  int IN_door_basement = 6;
  int IN_door_1bath = 7;
  int IN_magnet = 10;
  int IN_mag_allign_a = 11;
  int IN_mag_allign_b = 12;
  int OUT_strobe = 13;
  int IN_magnet_on = A2;
  int OUT_audio = A3; // Will MESS with PWM output
  int OUT_audio_gain = A6;
}

I could be missing something... tired. Oh, the magnetic allign is to check if magnet lock is alligned, allignment and occlusion is VITAL with those kind of locks. Someone suggested drilling a hole perpendicular to the plate surface, essentially cross-drilling plate and magnet. One side has LED peeping down a hole to other side, another hole... if they line up... the photosensor / diode / trans... etc... will pick up the light. I will drill aluminum billet and affix it to side, as drilling steel could warp from heat and you dont want your armature plate warped. Then another one at a different angle. Hence two inputs. LEDs driven at flat level, no signal or anything. Ambient is likely to be nil.

When I see "police wacker" I immediately wonder if this project is illegal, or anti-social ?

Bar Sport seems a strange place to ask for advice.

...R

A police whacker is a lady (or gent) of the night who works diligently with the police, robin.

Qdeathstar:
A police whacker is a lady (or gent) of the night who works diligently with the police, robin.

I bow before the breadth of your knowledge. I have been much too sheltered.

But I still can’t make sense of this phrase from the OP

The strobes are police wacker juniors

.

…R

PS… just crossed my mind that “diligently” may be a euphemism for “freebie” rather than “snitch” ?

“Am I on right path? ” Not going to get help from Bar sitters. ;)

You want a straight answer to your joke? Don’t use ints where bytes will do.

The shouldn’t be in setup() as they go out of scope when setup() finishes. But I figured it’s just a joke and maybe venting over trying to help some particularly dense member.

@robin, the quote buttons won’t work on my phone but freebie, indeed.

It's me that's dense. I wanted a light hearted answer, if one at all. Thinking out loud.

I didn't "get" the setup fx declarations would roll out of scope. Duh... Thanks. Not sure why I chose int then switched to boolean to set a var (that var is to determine state change).

As for the police lights... I can't find it online but I swear they were called wacker juniors, AllElectronics out of Van Nuys sold em a few years ago. Nice construction, meant for automotive use. Of course, I can't use them on a auto. Police around here are going Blue and Blue, not Blue n red.... eh

You seem to be missing a few key concepts. Have you gone through the Arduino Foundations Page?

GoForSmoke: You seem to be missing a few key concepts.

The most important missing concept is the fact that Bar Sport is not the place to ask questions if you really want help.

...R

He's lost and confused and now the pack circles as the last sticks on the fire burn out....

I'm just depressed and forgetful

Dumb. I hooked up LEDs backwards. As if there were not enough ways to differentiate cathode from anode. WiFi blows, change SSID, my cameras can’t figure out what’s going on and never reconnect.

Were you ever able to get any of those working right?

If NO then sure, try em all at once!

I still am looking for a microwave. Wife'll kill me if I use the oster. But the clock on it is bad, so if I get some plasma over there it could heat the oscillator... eh... I'm a bit of a nutball. GoForSmoke, you pegged me on missing a few...hmm. Wonder if I could use an LM324 quad op amp with this bundle of K tCs. I'm not in mood to spend $10 for a calibrated amp. ... 5 minutes... come on.

Try sticking with what you know and only adding what's within your reach, or just stop bullshitting.