swilker
Posts: 12
Joined: Mon Dec 28, 2015 4:05 am

General Confusion net to Python

Mon Dec 28, 2015 4:09 am

Can some one explain to me why on post:
http://computers.tutsplus.com/tutorials ... -cms-20051
that I'm declaring
Motor1A = 16
Motor1B = 18
Motor1E = 22
is used to control a motor when I'm actually wired into 23,24,25 on the pi? that's wild

scotty101
Posts: 4099
Joined: Fri Jun 08, 2012 6:03 pm

Re: General Confusion net to Python

Mon Dec 28, 2015 2:19 pm

The pins on the Raspberry Pi's main connector is numbered from 1-40. These are the board pin numbers
These pins make available a set of GPIO pins, in your case your are using 16,18 and 22. These are the BCM pin numbers.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Abhiraj Tiwari
Posts: 10
Joined: Wed Dec 16, 2015 1:57 pm

Re: General Confusion net to Python

Mon Dec 28, 2015 5:38 pm

pxgator wrote:For getting started with Python here is a good place to start:
https://www.raspberrypi.org/documentati ... /README.md

If you like Arduino style coding here is a system that the Arduino
environment is based on and it works great with the RPI 2:
https://www.raspberrypi.org/documentati ... /README.md
Thanks a lot pxgator

swilker
Posts: 12
Joined: Mon Dec 28, 2015 4:05 am

Re: General Confusion net to Python

Wed Dec 30, 2015 12:31 am

Ok thanks, but is there a cross reference between the raspberry numbers and the GPIO numbers, how does one know?

User avatar
DougieLawson
Posts: 40167
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: General Confusion net to Python

Wed Dec 30, 2015 12:35 am

swilker wrote:Ok thanks, but is there a cross reference between the raspberry numbers and the GPIO numbers, how does one know?
http://pinout.xyz has an interactive pin number mapper. It does all three numbering schemes (board, BCM and WiringPi).
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.


User avatar
davidcoton
Posts: 5494
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: General Confusion net to Python

Wed Dec 30, 2015 12:37 am

Try this

Wow, three answers in three minutes!
Location: 345th cell on the right of the 210th row of L2 cache

Return to “General discussion”