Monday 15 September 2014

raspberry pi - why simple led python program not working -


I'm testing my pie for the first time and I'm not able to run the first program to lead.

  Import GPIO import time GPIO.setmode (GPIO.BCD) GPIO.setup as RPI. GPI (18, GPIO.OUT)  

My code ID is from the Raspberry Cookbook. (True): GPIO.output (18, true) time.sleep (1) GPIO.output (18, Wrong) time.sleep (1)

When I run the script, Sudo python led.py does not show any error but there is no output in the lead. I tried to add a 360ohms between pin 18 and lead. Also tried to add 540 ohm between pin 18 but lead but no result

Can suggest suggesting debugging any problem

You might (but I do not know whether either the main stack or the EE-centric or RPI is a good way to inline the spinoff) shows a diagram of some type At which point you are adding the pin, at least, you have GDIO 18 for GND Rurt, and as some of the LED light-emitting diode or the effect, you must ensure that your LED is pointing in the right direction. I suggest partial way to debug it, loop out the loop and configure the LPD by writing 1 for the apppriet / system / blah / path. Apart from this, the GPIO 24 is wired at P1_18 so that you can double check that the pin 18 you put 18 is called 18 on either side.


No comments:

Post a Comment