You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Assembling Raspberry Pi.

The difference between python and python3 are version numbers and dates.

 

Members of this group:

Kaisa Rantala

Raine Kuosmanen

Topi Kahila

Kristian Hyvönen

 

What you need:

  • Raspberry Pi
  • Micro USB - power cord
  • Raspberry Pi Wifi dongle
  • Keyboard, mouse and monitor and cords to these

 

Step-by-step guide to assembling Raspberry Pi:

 

  1. Turn on the Raspberry Pi
  2. Press Shift-button while starting the Raspberry Pi to access the operating system menu
  3. Elect the Raspbian operating system and press Install
    ...
  4. Modify the settings to suit your needs (time zone, keyboard layout, etc.)
    ...
  5. Start the graphical user interface with "startx"-command (without the quotation marks)
    ...
  6. Connect to the Internet with "Wifi Config"-program
  7. Update the operating system
  • Open "LXTerminal"
  • Write "sudo apt-get update" (without the quotation marks)
  • Write "sudo-apt-get upgrade" (without the quotation marks)
  • Wait until the update is ready (If you have problems while updating you can continue the update with "sudo dpkg --configure -a"-command (without the quotation marks))
  • After updating, start Raspbian over with the command "sudo shutdown -r now" (without the quotation marks)
  • After the reboot the desktop should look normal.

    8. You can upload screenshots with command "sudo apt-get install scrot" (without the quotation marks)
    9. Screenshots van be taken by command "...scrot" (without the quotation marks)
    10. To open python3 with the command "python" (without the quotation marks) you need to give command "alias python=python3" (without the quotation marks)
    11. Make a new folder in to the home directory with following commands: "cd /home" "sudo mkdir "name"" (without the quotation marks, the "name" should be inside quotation marks)
    12. Go to the new folder by command "cd python_files"
    13. Create a new file "sudo nano hello.py" (without the quotation marks)
    14. Add the necessary code to the file and save it.
    15. Try whether the code works by command "python hello.py" (without the quotation marks)


What is PWM?

PWM (Pulse Width Modulation) controls speed and frequency constantly. It works by varying ON and OFF -pulses. A simple PWM need an inverter chip, diodes, trimpot, and capacitor to work. Its main use is to control the power that is supplied to electrical devices (mostly motors).


 Blinking the LED
-light

1.) Download metroGPIO.py

 

2.) Download tst.py

 

3.) Download WinSCP

 

4.) Move the files to Raspberry

 

 

 

Turn off Raspberry Pi

 

 

 

Attach Buffer Board

 

 

 

Attach LEDs and wires to bread board

 

 

 

Turn on Raspberry

 

 Run a python program tst.py as a super user (sudo)

 

 

 

Create a new file "led.py"

 

Define the blinking frequency into the file.

 

There is no content with the specified labels

  • No labels
You must log in to comment.