Output pin question

Hi:
Thank you for the help. I am new to Arduino but not new to other things. I needed code written for a project and hired a real helpfull guy on a freelancer website. The project is pretty basic. The Arduino takes input from an ultrasonic sensor and then turns on a horn through a solid state relay when an object moves a certain distance.There are two LEDs to inform of system status. This man wrote the code and drew the circuit and I wired the breadboard and loaded the code.After some amount of difficulty (because I knew nothing about Arduino or the code) I got things to work while learning a lot, I know more than when I started. The sensor and horn work OK but something is wrong with the LEDs, they turn on alright but not at the right time and although they get dimmer and brighter they never completely turn off. I am using a 12 VDC battery to power the Arduino on the Vin pin. Pins 5,6 and 7 are set as outputs and the sensor is an input. Pin 7 powers a transistor that suppliesd the ground for the relay. He had me wire the LEDs by connecting 1000 ohm resistors to the 12VDC positive then the positive sides of the LEDs to the resistor and the negative side to pins 5 and 6. The way I see it pins 5 and 6 supply positive voltage out, the LEDs light because there is a voltage differential but they do not work correctly. I could use some help from someone more familiar with Arduino pins. Thank you.

You need to remove the connections from those 1000 ohm resistors to +12V, and connect them to the Arduino +5V pin instead. Then they will turn off, if the software is OK. You may then need to reduce the value from 1000 ohms to make them bright enough. Try 270 or 330 ohms.

Thanks. You mean leave the LEDs connected to the pin 5 and 6 as is? Will that not supply 5VDC to both sides of the LED?

Yes, leave the LEDs connected to pins 5 and 6. When the Arduino drives one of those pins LOW, the pin will be close to 0V, so there will be 5V across the LED + resistor combination, so the LED will light. When the Arduino drives the pin HIGH, there will be +5V on the pin, therefore 0V across the LED + resistor, so the LED will not light.

Thanks again. I want the LEDs to light when the pins are high. Can't I just connect the positive side of the LED to pin 5 and the negative side through the resistor to ground?

Yes, you can do it that way.