Sure, here it is. ![]()
Heres is the programming i just did, what am i doing wrong if anything?
const int buttonPin = 2;Â Â // smokedetector 1
const int buttonPin2 = 3;Â Â // smokedetector 2
const int ledPin =Â 10;Â Â Â // relay1
const int ledPin2 =Â 11;Â Â // relay2
// variables will change:
int buttonState = 0;Â Â Â
void setup() {
 // initialize relay 1 pin as an output:
 pinMode(ledPin, OUTPUT);  Â
 // initialize relay 2 pin as an output:
 pinMode(ledPin2, OUTPUT); Â
 // initialize the smokedetector 1 pin as an input:
 pinMode(buttonPin, INPUT); Â
 // initialize the smokedetector 2 pin as an input:
 pinMode(buttonPin2, INPUT); Â
}
void loop(){
 // read the state of the pushbutton value:
 buttonState = digitalRead(buttonPin);
 buttonState = digitalRead(buttonPin2);
 // check if the pushbutton is pressed.
 // if it is, the buttonState is HIGH:
 if (buttonState == HIGH) { Â
  // turn LED on: Â
  digitalWrite(ledPin, HIGH);Â
  digitalWrite(ledPin2, HIGH);Â
 }
 else {
  // turn relays off:
  digitalWrite(ledPin, LOW);
  digitalWrite(ledPin2, LOW);
 }
}