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
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()
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