Difference between revisions of "Raspberry Pi - Week 4"

From Robert-Depot
Jump to: navigation, search
(using pins with python)
(using GPIO with python)
 
(2 intermediate revisions by the same user not shown)
Line 48: Line 48:
 
*LCD interface https://projects.drogon.net/raspberry-pi/gpio-examples/lcd-interface/
 
*LCD interface https://projects.drogon.net/raspberry-pi/gpio-examples/lcd-interface/
  
===using pins with python===
+
===using GPIO with python===
 
*https://code.google.com/p/raspberry-gpio-python/
 
*https://code.google.com/p/raspberry-gpio-python/
<nowiki>
+
**<code>sudo apt-get update</code>
sudo apt-get update
+
**<code>sudo apt-get install python-dev</code>
sudo apt-get install python-dev
+
**<code>sudo apt-get install python-rpi.gpio</code>
sudo apt-get install python-rpi.gpio
 
</nowiki>
 
 
*Examples - https://code.google.com/p/raspberry-gpio-python/wiki/Examples
 
*Examples - https://code.google.com/p/raspberry-gpio-python/wiki/Examples
 +
**Basic Usage
 +
**Inputs
 +
**Outputs
 +
**PWM
 
*adafruit - http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/overview
 
*adafruit - http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/overview
**Rpi.GPIO -
 
**requires python-dev
 
**python-rpi.gpio
 

Latest revision as of 16:09, 26 April 2013

<<< back to Raspberry Pi

Review

  • Installed software with apt-get. (including festival).
  • Installed and ran VNC to get a remote desktop on the machine.
  • Ran a simple python script to synthesize speech ( example)
  • Another python tutorial: Learn Python the Hard Way

Video Playback

  • Omxplayer is a video player specifically made for the Raspberry PI's GPU made by Edgar (gimli) Hucek from the XBMC project.
    • omxplayer comes pre-installed on our raspbian distribution.
  • Try it out.
  • Copy a movie file to your raspberry pi using scp. The movie needs to be .mp4 format.
    • you can transcode with ffmpeg:
    • ffmpeg -i mouse_brain.wmv mouse_brain.mp4
  • run omxplayer:
    • omxplayer ~/Movies/mouse_brain.mp4
  • You can control playback with a number of hotkeys:

ffmpeg

  • Install this on your computer, not the raspberry pi.
    • install homebrew
    • brew install ffmpeg
  • using ffmpeg to transcode a video file:
    • ffmpeg -i ~/Movies/dogkiss.mov dogkiss.mp4

Scripting Video Playback

video_loop.tar

GPIO

Note on voltage Levels

Tutorials

using GPIO with python