What is Raspberry Pi

The Raspberry Pi is based on the Broadcom BCM2835 system on a chip (SoC) which includes an ARM1176JZF-S 700 MHz processor, VideoCore IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded (Model B and Model B+) to 512 MB. The system has Secure Digital (SD) or MicroSD (Model A+ and B+) sockets for boot media and persistent storage.

About Raspbian OS

Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware. An operating system is the set of basic programs and utilities that make your Raspberry Pi run. However, Raspbian provides more than a pure OS: it comes with over 35,000 packages, pre-compiled software bundled in a nice format for easy installation on your Raspberry Pi.

Fun with Raspberry Pi

Time to get creative with your computing -- here are our favourite fun things you can do with your Raspberry Pi.

MAKE RESOURCES

Resources. Free resources to teach, learn and make with Raspberry Pi. Teach. Schemes of work to teach with Raspberry Pi · Learn. Exercises to learn with.

Python (programming language)

Python is a widely used general-purpose, high-level programming language.Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java.The language provides constructs intended to enable clear programs on both a small and large scale.

RASPBERRY PI

The Raspberry Pi is a credit card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools. Tools available are Python as the main programming language, with support for C, C++, Java, Perl and Ruby.
Showing posts with label Led Glowing. Show all posts
Showing posts with label Led Glowing. Show all posts

Friday, 5 December 2014

Program for Led Glowing(ON OR OFF)

STEP 1:

Open LX-Terminal.

Create a file with .py extension

Ex: nano led.py

Nano is a type of editor used to write the code in that file named led.

Type the following code in that file by insert key or by typing letter I on keyboard.

Program:

To turn on LED’S

#! /usr/bin/python
Import RPi.GPIO as GPIO          //To import the RPi.GPIO module
GPIO.setmode (GPIO.BCM)       //Now set the mode to represent the numbering scheme you prefer.
GPIO.cleanup ()                            //Return all channels you have used back to inputs.
GPIO.setwarnings (False)            //Turn off warnings that are annoying.
GPIO.setup (17, GPIO.OUT)      //You need to set up every channel you are using as input/output.                                                              This one is an output
GPIO.setup (27, GPIO.OUT)      //Setup again but this time pin 27.
Print “Lights on”                          //To turn LEDs ON
GPIO.output (17, GPIO.HIGH)  // led on purpose
GPIO.output (27, GPIO.HIGH) //led on purpose

Save the file by typing  :wq and then press enter. 

To check output:Type python led.py


Output 1:

To turn off LED’S

#! /usr/bin/python
Import RPi.GPIO as GPIO           //To import the RPi.GPIO module
GPIO.setmode (GPIO.BCM)       //Now set the mode to represent the numbering scheme you prefer.
GPIO.cleanup ()                            //Return all channels you have used back to inputs.
GPIO.setwarnings (False)            //Turn off warnings that are annoying.
GPIO.setup (17, GPIO.OUT)      //configuring 17th pin as output
GPIO.setup (27, GPIO.OUT)      // configuring 27th pin as output
Print “Lights on”                          //To turn LEDs ON
GPIO.output (17, GPIO.LOW)   // led off purpose
GPIO.output (27, GPIO.LOW)   //led off purpose

To check output:Type python led.py

Output 2: