Skip to content

Instantly share code, notes, and snippets.

@tankywoo
Created April 25, 2013 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tankywoo/5461634 to your computer and use it in GitHub Desktop.
Save tankywoo/5461634 to your computer and use it in GitHub Desktop.
树莓派 一直点亮GPIO11 控制的发光二极管
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
# need to set up every channel which are using as an input or an output
GPIO.setup(11, GPIO.OUT)
while True:
GPIO.output(11, GPIO.HIGH)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment