In this instructable I want to show you how to install operating system (OS) on your raspberry pi, how to modify it to get it work with 7" display and a simple small project.
At tge begining I want to say something about raspberry pi.
What is this?
Raspberry pi is small computer in size of credit card. This is single board computer so everything what is needed to make it work is placed on single PCB.
Who made it?
It's made by Raspberry Pi Foundation, and they create it to promote computer science.
There is few version of raspberry pi in this tutorial I will be using version 3 which is the newest and the most powerfull one. If you want to buy one, the best choice is to get version 3. It's just a little bit more expansive than version 2, but has built in wifi and bluetooth 4.0 and processor architecture is 64 bits (previous versions were 32 bits)
Step 1: What You Will Need?
- You will need Raspberry pi. No matter wich version but as I mentioned earlier 3 is the best. You can buy it here:
- 7" LCD display. This display is great, it has 1024x600 resolution and everything looks really good on it. Additionally you can connect it to your computer and use as additional display (this feature is very useful for me because I am making game in unity so I can see it on this display as on android tablet). HDMI and USB cables are included. You can buy here:
- mouse and keyboard
- Power supply. Raspberry pi is powered by microUSB port so you can use your smartphone charger but it need to have efficiency of at least 2,5A (I bought my in local shop and it has 3,1A)
- microSD card at least 8GB or more (I use 16GB)
Step 2: OS Installing
We will install raspbian because this is most popular system for raspberry pi. You can also install other systems like: windows IoT, android, OpenElec & XBMC (KODI), and a lot of distributions of Linux.
While writing raspbian to microSD card you will lose all data from it. So make sure that it's not important or you have a copy of it.
You can download image of system form here as .zip. Then you can unzip downloaded archive. Then you can download special program called Win32DiskImager for creating system on microSD card from ISO right here, and install it on your computer. Open Win32DiskImager and click little blue folder icon, choose your image of raspbian then choose your device that you want to install system on. Click write. Thats all your system is created on your microSD card. You can see it on images above (because I am from Poland I have polish version of this program so you will have diferetn text in it).
Step 3: Modyfing OS for Our Display
After installation you can plug your microSD card to your raspberry plug keyboard, mouse, connect it to TV and play with your raspberry. But if you want to use raspberry with 7" display you need to add few lines of text to config.txt on your SD card.
Plug your microSD card to computer and open it. Find config.txt open it and at the end of it add this lines:
max_usb_current=1 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 1024 600 60 6 0 0 0
Save this file. And thats all now you can use display with raspberry
Step 4: Connecting
Start by putting your microSD card in raspberry. Then connect mouse, keyboard and display to USB ports (USB from display is for powering and touch). Then connect your display to pi with HDMI cable. And finnaly power up your pi with microUSB port. Your Pi will turn on automaticly. After few seconds you will see raspberry on the screen then your pi is ready to play with it.
Step 5: Simple Project
Now I want to show you very simple project that I made using raspberry pi. I am completly new to raspberry and python programing (for me the worst programing language). So at the begining I made a simple program that controlls 4 leds just by clicking on the screen. I made UI using tkinter library.
What I used:
- 4 leds
- 4 resistors
- some cables
Leds are conneted to pins numbers: 18, 14, 15, 23 and GDN
Above you can find led.py this is python program for controlling leds. To run it copy it to your raspberry pi desktop. Open terminal and type:
This will change directory (cd) to desktop
this will run led.py as python script
Step 6: Conclusion
Summarizing, raspberry pi is great tool and I hope that when I learned something more about python I will made amazing projects with it. I have some plans, like smart home v2 and maybe something with irobot create 2 which I won in robotics contest :) Thank you instructable!
If you have any questions leave comment. Thanks for reading!