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

General Confusion net to Python

Mon Dec 28, 2015 3:31 pm

hey,

I am not able to learn the python language maybe because it is difficult or i dont know the right source to learn it...(if anyone knows please tell me).

So i had a doubt if it is possible to code the raspberry pi GPIO with the arduino IDE or any other compiler that runs the same set of code.

Thanks in advance
pls reply soon

P.S - i am familiar with arduino IDE and i own an arduino..... I am using raspberry pi 2 "the latest one!"

pxgator
Posts: 105
Joined: Mon Feb 16, 2015 6:45 pm
Location: Southern Colorado, USA

Re: General Confusion net to Python

Mon Dec 28, 2015 5:11 pm

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/blog/now-av ... rocessing/

P.S. second link is fixed now
Last edited by pxgator on Mon Dec 28, 2015 7:50 pm, edited 1 time in total.
So what's all this RPi stuff anyhow? Well folks, it's a feat of engineering from
the UK almost as remarkable as the De Havilland Mosquito and the Colossus.

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

Re: General Confusion net to Python

Mon Dec 28, 2015 5:42 pm

The first link you gave is nice but it does not have any information related to operating the GPIO using python.
It is the basic programming using numbers and letter.

I want to learn ... how to control the digital pins on raspberry pi 2 using python

btw thanks for the reply

User avatar
rpdom
Posts: 17703
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: General Confusion net to Python

Mon Dec 28, 2015 5:51 pm

Abhiraj Tiwari wrote:The first link you gave is nice but it does not have any information related to operating the GPIO using python.
It is the basic programming using numbers and letter.

I want to learn ... how to control the digital pins on raspberry pi 2 using python

btw thanks for the reply
At the bottom of the page in that link there is another link to Advanced Topics. The last example on that page is about starting to use GPIOs in Python. It gives this code as an example

Code: Select all

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)  # set board mode to Broadcom

GPIO.setup(17, GPIO.OUT)  # set up pin 17
GPIO.setup(18, GPIO.OUT)  # set up pin 18

GPIO.output(17, 1)  # turn on pin 17
GPIO.output(18, 1)  # turn on pin 18
There should be many more examples in the MagPi magazine too (free online).

RDS
Posts: 783
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: General Confusion net to Python

Mon Dec 28, 2015 10:17 pm

Just Google 'GPIO pins' there is loads of information.

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

Re: General Confusion net to Python

Tue Dec 29, 2015 6:27 pm

Thanks guys for your help.

Return to “Python”