My 1st Programming Project

I want to use a set of alarm contacts to control an LED. If the contact is open the LED flashes. If the contact is closed the LED is on.

OK. Go ahead. If you run into trouble post the code here and we will try to help.

Was there a question with this?

I am a newbie myself and there are plenty of tutorials on youtube that will walk you through the process, this project is pretty simple and about an hour of trial and error you can get it. you will use an if, else statement for the logic, and define 1 input and 1 output. use the blink example in arduino for blinking the LED.

Sgansky:
I want to use a set of alarm contacts to control an LED. If the contact is open the LED flashes. If the contact is closed the LED is on.

First of all: Make clear about the hardware circuit used!

Opening/closing contacts can be used in two different circuits:

  • circuit with using a pull-up resistor
  • circuit with using a pull-down resistor
    Which is the circuit you have with your alarm contacts?

Or don't you have circuit schematics yet and need one?

If you know about the circuit and whether open contacts== signalling HIGH and closed contacts==signalling LOW or the other way round, then you can start programming around your button logic.

Got it working using the sample code from Blink & Button!!