Sunday 3 January 2016

Raspberry Pi basics - Power on and get ready to program

Using a Windows PC can be easier than using the Raspberry PI. Here is a guide to set-up the Raspberry PI and connect your Windows PC to start programming in Python.

Connect up the Raspberry PI

  1. Get the Raspberry PI running as a PC see this list of what is required
  2. Plug all items in like the below image.
  3. Download or buy a SD card (This model uses a Miro SD card).
    Install Raspbian Wheezy operating system installed. (The NOOBS SD download includes Raspbian and is what all new user should use).

First time boot up

  1. Power up the Raspberry Pi you should get the starting script like below
  2. Power install Rasbian then restart for basic setup.
  3. Run the following options

    • Expand File system to use whole SD card
    • Change User password (User name is pi by default)
    • Enable Desktop but not scratch
    • Internationalization Options to match your country
    • When you are done the system will reboot.

Enable SSH (Remote command line access )

  1. Double click on LX Terminal and type sudo raspi-config to get back into the configuration screen
  2. Select Advance Options
  3. Select A4 SSH Enable/Disable remote command line options
  4. Select Enable

Install PuTTY

  1. Download PuTTY on your Windows PC the putty.exe is all that is required.
  2. Run PuTTY 
  3. On the Raspberry PI get the network address. 
    • Open LX Terminal
    • type ifconfig and remember the IP address
  4. Configure PuTTY as below with the address
  5. Click Open and accept the Security alert (Accepting the rsa2 key from the device)
  6. Then login as pi and the password you configured earlier (default password is raspberry)
  7. Now you should update the Raspberry Pi to the latest version (The device needs internet access for this to work).
  8. In the terminal either remote or local LX terminal type sudo apt-get update (sudo means super user do) the PI will get the latest updates for the current version installed.(This should be done before upgrading the version). It will download and install in a few minutes as below
  9. Then get the latest version of the raspbin operating system by typing sudo apt-get upgrade this can take a very long time and will let you know how much disk space it will require as below before upgrading.
  10. Once upgraded reboot sudo reboot

Notepad++ editor





  1. Now for programming using a Windows PC I would recommend downloading and installing Notepad++.
  2. Once installed configure as below
  3. Now you are ready to program
  4. Connect to the Raspberry Pi
  5. Create a folder for your python programs
  6. Then create a test program in the folder. Create the file first python files end with .py
  7. Then right click and Download file to the editor
  8. Write a small test program like the one below
  9. Click on File then Save and the program will be saved on the PC and then uploaded to the Raspberry PI
  10. Open a PuTTY session to test the code
  11. Type python FolderName/FileName.py see my example below

  12. That's it you have a great place to start programming your Raspberry PI.
Note: The lynx operating system is case sensitive so make sure you use the correct case for all files and folders. Its good practice to use lower case so you don't have to remember if you had an upper case letter in your file name. So this example show what you should not do!

No comments:

Post a Comment

Thank you fro reading my page.
Let me know if there is anything that I could add or change.
Please let me know if this information is helpful.