Saturday, April 12, 2014

LED blink code for raspberry pi

  1. import RPi.GPIO as GPIO  
  2. import time  
  3. # blinking function  
  4. def blink(pin):  
  5.         GPIO.output(pin,GPIO.HIGH)  
  6.         time.sleep(1)  
  7.         GPIO.output(pin,GPIO.LOW)  
  8.         time.sleep(1)  
  9.         return  
  10. # to use Raspberry Pi board pin numbers  
  11. GPIO.setmode(GPIO.BOARD)  
  12. # set up GPIO output channel  
  13. GPIO.setup(11, GPIO.OUT)  
  14. # blink GPIO17 50 times  
  15. for i in range(0,50):  
  16.         blink(11)  
  17. GPIO.cleanup()  

MM32f103 led blink program

To work on mind motion MM32 microcontroller we need to install the keil uvision 5 version then install the mm32-link programmer go to li...