My first Raspberry PI Device

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.