Okay, I'll admit it. This is the first example of learning from a book.
I started the raspberry Red version, version 2, see such a small card computer can do so many things, it is really surprising!
installation system, etc. are very smooth, start, installation program, Remote Desktop, SSH login, etc. are very smooth, is installed XBMC not, various versions are not, start up after the operation will hang off, do not know what is the reason, power supply no problem, 2 A, and then test it. In the future, I think it's OK to buy green version, no difference.
Today, I tried a few of the various accessories, first a small picture:
This is probably the simplest rasp the application of:-)
Bread Board is a simple series circuit, the resistance is 10K, to prevent burning led, pay attention to the LED foot for the positive, connected to the GPIO11, plug the reverse is not bright.
The other end is connected to the GPIO6.
OK, I typed the following code:
# import library Rpi.gpio as GPIO import Span style= "color: #000000;" > time # The following is not in the textbook, it may be the reason I installed a different version of the Gpio gpio.setmode (GPIO. BOARD) # set input output Gpio.setup (11< Span style= "color: #000000;" >,gpio. Out) # make an LED flashing neon light for 2 seconds, 2 seconds to kill Span style= "color: #0000ff;" >while True:GPIO.output ( 11,true) time. Sleep ( 2) Gpio.output ( 11,false) Time.sleep ( 2)
OK, run the code, a low-end cheap low-grade small neon lights flashing up :-)