# Problem with LED blink program on Pi

I am completely new to RPi and stuck unexpectedly. I am trying to create a simple python program to make my LED blink. Here are the two programs which are giving same outputs on terminal when I checked the status with gpio readall

# 1.

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(4,GPIO.OUT)

for i in range(10):
print "all good"
GPIO.output(4,True)
time.sleep(5)
GPIO.output(4,False)
time.sleep(5)

GPIO.cleanup()


2.

from gpiozero import LED
from time import sleep

led = LED(4)
print(led.value)
led.off()
i=0
while i<10:
print("hi test")
led.on()
sleep(1)
led.off()
sleep(1)
i+=1


When I check my LED circuits, it seems all good with 3.3V... however, when I change the pin to any other one LED is not blinking. In fact, nothing is happening.

Please help! Pin: 6 and 7th. The red wire is to ground. Resistor: 560 Ohm!

I am using Pi 1 B+ with raspbian stretch; Python 2.7 and 3.5

## bumped to the homepage by Community♦yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

• You are asking us to guess how the LED is connected. That is a waste of our time. Please edit your question and add a photo of your connections. – joan Apr 9 '18 at 10:40
• @joan. Please see. I have added images. Thank you. – Rishi Apr 9 '18 at 10:48
• So, the red wire is ground, right? – Jaromanda X Apr 9 '18 at 10:50
• so, on the LED, which pin is the anode and which is the cathode – Jaromanda X Apr 9 '18 at 10:51
• Quite simply, you appear to be connecting to the wrong pins - get rid of the IDC cable and directly connect. – Milliways Apr 9 '18 at 10:59