Meet Raspberry Pi
Raspberry Pi,sometimes referred to as Pi, is a low cost, single board computer. You can use it to learn to code in Python and to build cool electronic projects.
Exploring Raspberry Pi Hardware
Have you ever been curious to open stuff and see how it works? What are all the different parts and what do they do? Luckily, you do not have to break it open to see its parts. You can see the Pi’s components before you on the green circuit board in your hand. Identify the components: System on chip (SOC), General purpose input output (GPIO), Micro SD card, HDMI port, Audio jack, Ethernet port, USB Port.
System on chip (SOC): SOC is the brain of your Raspberry Pi. It is the big, black chip in the middle of your Pi board. Following are the 4 important parts of an SOC.
- Central Processing Unit (CPU): The CPU executes your programs and instructions.
- Graphic Processing Unit (GPU): GPU handles the multi-media tasks like drawing graphics or playing a video.
- Digital Signal Processor
- Random Access Memory (RAM): This is the short-term, working memory of the Pi. Raspberry Pi 3 comes 1GB of this RAM. This memory can retain its contents, only until the Pi is connectecd to a power supply.
General Purpose Input/Output (GPIO): Input and output are terms, used for communication to and from a computer. There are 40 pins in the top left corner of the Raspberry Pi. Not all 40 pins are for I/O. Some of them provide 5V, 3V and ground. Only the pins labled GPIO are the I/O pins.
Micro SD card slot: Micro SD card is the long-term memory for a Raspberry Pi. Raspberry Pi’s operating system Raspian is stored in the micro sd card. All your files and programs are stored here as well. Micro SD card comes in varying capcities like 8GB, 16GB and 32GB.
Micro USB power port: This is where you connect the Power adapter. It is very similar to the charging port found in your cell phone.
HDMI port: You connect to your TV / Monitor.
USB ports: There are 4 USB ports in the top right corner of the board, where you connect a mouse, keyboard and other peripherals.
Audio Jack: Where you connect your headphones.
Install the Operating System (OS)
Operating system is the core software that provides you an environment to run your cool programs. Some operating systems, that you might already be familier with: Windows, IOS, Android, Linux. Raspbian is the operating system, that you will installing in your Raspberry Pi.
New Out Of the Box Software (NOOBS): NOOBS is a term that is very specific to Raspberry Pi. NOOBS is the software that will help us install Raspbian in your Raspberry Pi.
Installing Raspbian: The Micro SD card that came with your kit, will usually have the NOOBS installed.
- Assemble the Raspberry Pi. Secure inside the case. Stick the heat-sink, if any
- Connect keyboard and mouse to the USB port. Your monitor to the HDML port. Insert micro SD card to the micro SD slot.
- Connect the power adapter to the micro USB port.
- Now, you NOOBS software run. Make sure you pick the right region (“US”) and the proper keyboard layout. Follow the instructions.
- At the end NOOBS will complete installing and it will restart. NOOBS job is over. Moving forward, it will will boot into the Raspbian operating system.
What is Programming?
Very simple. Programming means telling a computer to do something. Computers are dumb machines and they don’t know how to do anything. You have to tell them what to do. You tell a computer what to do with an Instruction. An instruction is a basic command you give to a computer , usually to do a single, very specific thing. You combine one or more instructions to write a program. Software just means a program or a collection of programs running on your computer.
What is Binary?
Computers “think” using lots and lots and lots of electrical circuits. At the very basic level very basic level, these circuits are switches that are either ON or OFF. A value of 1 is used to represent an ON state and 0 to represent a OFF state. All these 1s and 0s are kind of code called Binary.
What is a Python?
All computers use binary inside. Most people don’t speak binary very well. We need an easier way to tell a computer what to do. A programming language is an easier way to interact with a computer. It is human readable and another software called an interpreter, will translate to the binary language.
There are two versions of Python in use. The 2.7 version and the 3.3 version. They both are slightly different. We will be working with only the 3.3 version of python.
- Python was created from the start to be easy to learn.
- Python is free. You can download Python—and many, many fun and useful programs written in Python—for free.
- Python is open source software
- Although it is good for learning, it is not a toy. It is used by thousands of proessionals, including scientists at NASA.
Try some simple commands.
>>> print("Hello world") Hello World >>> print(3) 3 >>> print(4, 10) 4 10 >>> print(4+10) 14 >>> print(9*10) 90 >>> print('Hello!'*10) Surprise:)
Try some simple commands.
Read through this lesson 1 and understand the terminologies. There will a fun trivia based on this lesson.