simonmonk / raspirobotboard

Source for the RaspiRobotBoard Python library.
42 stars 20 forks source link

GPIO pins 21 and 27 reversed on newer RPi boards #3

Open sbrosnihan opened 10 years ago

sbrosnihan commented 10 years ago

http://www.raspberrypi.org/archives/1929

You are using GPIO.setmode(GPIO.BCM), which means that you need to check for the board type and set OC2_PIN to either 21 or 27 depending on the discovered type. Either that or use GPIO.setmode(GPIO.BOARD)

http://sourceforge.net/p/raspberry-gpio-python/wiki/BasicUsage/