Well, I admit that this is the first example of learning from books.
I started with the Raspberry red edition and version 2. I was pleasantly surprised to see that such a small card computer could do so many things!
The installation of the system is successful, and the startup, installation program, remote desktop, and SSH logon are all smooth, that is, the installation of XBMC is not good, and all versions are not good, after it is started up, the Operation will soon fail. I don't know why. There is no problem with the power supply. For 2A, try again later. In the future, I think you can buy the Green Edition. There is no difference.
Today, I tried a variety of new accessories and made a small picture:
This is probably the simplest Rasp application :-)
The bread is a simple series circuit with a resistance of 10 KB to prevent burning of LED. Note that the long pin of the LED is positive and connected to GPIO11.
The other end is connected to gpio6.
Okay, I typed the following code:
# Import RPi. GPIO as GPIOimport time
GPIO. setmode (GPIO. BOARD)
# Or # GPIO. setmode (GPIO. BCM)
# Set Input and Output GPIO. setup (11, GPIO. OUT) # create an LED flashing neon light, which is 2 seconds bright and 2 seconds off while True: GPIO. output (11, True) time. sleep (2) GPIO. output (11, False) time. sleep (2)
Okay, run the code. A low-end, stingy little neon light is flashing up :-)