Hardware info
wireless keyboard problems
If you are having problems with wireless mice try adding
usbhid.mousepoll=0
to cmdline.txt – this can be found in /boot
Camera stuff
line to info on main Rpi site
http://www.raspberrypi.org/help/camera-module-setup/
link picamera site – for controlling pi camera from python directly
http://picamera.readthedocs.org/en/release-1.9/index.html
Omxplayer
To play video files or view single images [and you don’t want to install a full media solution such as XBMC] then you can play directly from the command line using Omxplayer. This is a media player created by Edgar Hucek specifically for the Raspberry Pi and it takes advantage of the Pi’s GPU.
Installation
Omxplayer is installed on the latest Raspbian image so you may already have it installed. If not you can install it using :
sudo apt-get update sudo apt-get -y install omxplayer
Link to settings and instructions
http://www.raspberrypi.org/wp-content/uploads/2013/07/RaspiCam-Documentation.pdf
Basic Usage
To play a video file you just need to type :
omxplayer myvideo.mp4
If you are using HDMI you should use this command to pass audio over the HDMI interface :
omxplayer -o hdmi myvideo.mp4
——————————————————————————————————
PIR Motion Sensor HC-SR501 Infrared Detector
PIR sensor module with a single digital output. Operation – a 3.3V signal is output when motion is detected and is latched for an adjustable period of time. The output is then latched low for about 3s to avoid accidental re-triggering. Note unit needs 5v to operate
- VR1 controls the length of the latched high output when motion is detected. It can be varied from about 5s (default) to about 300s.
- VR2 controls the center of the detectable distance and can be varied from about 3m to about 7m.
- With the jumper set to the ‘H’ position (default), sensing is disabled after a sense event (ie. once output is high).
- With the jumper set to the ‘L’ position, sensing is enabled after a sense event. This allows for continuous motion detection. The output is still latched low for 3s once motion is no longer detected.
[ info source nooelec ebay shop, I purchased mine from AURA Hobby Electronics and Robotics on the UK ebay site ]
——————————————————————————————-
Sound
Setting where the sound goes, to change that, exit the script by typing CTRL+C and executing the following command to use the analog audio output:
$ sudo amixer cset numid=3 1
To send the audio through HDMI to the monitor, use:
$ sudo amixer cset numid=3 2
This can also be configured using sudo raspi-config, in the advanced options
links to info on RPi site
http://www.raspberrypi.org/documentation/configuration/audio-config.md
http://elinux.org/R-Pi_Troubleshooting#Sound
Setting the audio level
amixer sset PCM,0 90%
Playing sounds through python libraries seems can be problematic – sound wav files will play other won’t. for Simple stuff us the ‘os’ function and aplay
os.system('aplay xxx.wav &')
No sound after startx
Type this before startx
sudo modprobe snd_bcm2835 sudo amixer cset numid=3 <n> - where n = 1 to force audio to headphones