16 August 2013

LCD-Modul C0802-04

Dieses Modul gibt es derzeit bei Pollin für 0.95 €.






Leider hat das Display einen  Spaltenfehler


- keine Hintergrundbeleuchtung
- HD47780 kompatibel
- kann nur 4-Bit Interface verwenden
- 10 Pin Flexboardanschluß (kann entfernt werden - darunter Lötpunkte für Drahtanschlüsse)
- die passende Buchse für den Flexboardanschluß

Pinbelegung:
01:   GND
02:   VDD (+5V)
03:   Kontrastspannung (auf GND)
04:   R/S Register selection input
          H: data register(R/W)
          L: instruction code(w)
05:   R/W read/write selection input
          H: read (vom Display)
          L: write (zum Display)
Wichtig beim Raspi auf GND - nur schreiben. siehe Fußnote!!
06:   Enable read/write enable signal
          H: write data is latched on the falling edge
          H>L: read data is enabled by a high level
07:   Data4 (bit 4)
08:   Data5 (bit 5)
09:   Data6 (bit 6)
10:   Data7 (bit 7)

Beim Anschluß an den Raspi beachten, das R/W auf GND sitzt, damit das Display keine 5V Schreiboperationen beim Raspi versucht.
Die GPIO darf mit max 3.3V beaufschlagt werden, 5V sind tödlich !!!



Initialisierung nach Power on:
Initialisierung kann nach einer Pause > 40 ms wenn VDD > 2.7V beginnen

1.) Display Reset (3x selbe Befehlsfolge)
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   1   1  dann Pause > 4.1 ms

 0   0   0   0   1   1  dann Pause > 100 µs

 0   0   0   0   1   1

2.) 4-bit einstellen 
RS R/W DB7 DB6 DB5 DB4
 0   0   0   0   1   B  (B=0 4Bit / B=1 8Bit)

3.) 4-bit und 1 Zeile und Char-Font
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   1   B  (B=0 4Bit / B=1 8Bit)
 0   0   Z   F   x   x  (Z=0 1 Zeile / Z=1 2Zeilen)
                        (F=0 Font 5x10 / F=1 Font 5x8)

4.) Display an 
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   0   0 
 0   0   1   D   C   B  (D Display On/Off)
                        (C Cursor On/Off)
                        (B Cursor Blink On/Off)

5.) Position weiterrutschen (schiebt den Cursor auf nächste Pos. beim schreiben in den DD- oder CG-Ram) 
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   0   0 
 0   0   0   1   M   S  (M Moving Direction)
                        (S Shift enable) 

6.) Display löschen
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   0   0 
 0   0   0   0   0   1

7.) Cursor auf Home
RS R/W DB7 DB6 DB5 DB4 
 0   0   0   0   0   0 
 0   0   0   0   1   x

Initialisierung ist hier abgeschlossen

8.) Schreibe ein Zeichen (hier ein W - 01010111)
RS R/W DB7 DB6 DB5 DB4 
 1   0   0   1   0   1 
 1   0   0   1   1   1


Wiring Pi

Wiring Pi wird zur Ansteuerung der GPIO Pins verwendet und benötigt dazu keine root-Rechte.

Setup:


pi@raspberrypi ~ $ sudo apt-get install git-core

pi@raspberrypi ~ $ sudo apt-get update

pi@raspberrypi ~ $ sudo apt-get upgrade

pi@raspberrypi ~ $ git clone git://git.drogon.net/wiringPi

pi@raspberrypi ~ $ cd wiringPi

pi@raspberrypi ~/wiringPi $ git pull origin

pi@raspberrypi ~/wiringPi $ ./build

... viel Text ...

All Done.

NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,
  Gertboard, MaxDetext, etc. routines then you must change your
  compile scripts to add -lwiringPiDev



Eingang auslesen
gpio -g read 23

GPIO Pin als Ausgang definieren
gpio -g mode 23 out

Ausgang setzen
gpio -g write 23 1

Vollständige Informationen zu WiringPI findet man in der manpage
man gpio

12 August 2013

Raspi Bluetooth

Eine Menge Leute haben Probleme beim Einrichten einer Bluetooth-Tastatur und Maus auf dem Raspberry PI. 
Die Dinge werden komplizierter, wenn Ihre kabelgebundene Tastatur oder Maus nicht funktioniert oder verhindert, dass Ihr Bluetooth-Dongle arbeitet. 
Diese Schritt für Schritt Anleitung nutzt nur das Command Line Interface. Sie ist für die Debian-Distribution Wheezy ausgerichtet.
Stecken Sie den Bluetooth-Dongle direkt auf dem Raspberry PI Bord.
Starten Sie den Raspberry PI und verbinden Sie ihn mit SSH von einem anderen Computer. Andernfalls verwenden Sie eine verkabelte oder drahtlose Tastatur. Melden Sie sich an als pi , Passwort raspberry .
Wechseln Sie zu root

sudo bash

Installieren Sie alle Updates. Es wird eine Weile dauern.

apt-get update
apt-get upgrade

Aktivieren Sie dbus

update-rc.d -f dbus defaults
reboot

Melden Sie sich wieder an als pi , Passwort raspberry. Wechseln Sie wieder zu root .
Installieren Sie die erforderlichen Pakete. Es wird eine Weile dauern.

apt-get install bluetooth bluez-utils blueman

Starten Sie wieder neu wie oben beschrieben. Melden Sie sich als pi , Passwort raspberry. 
Wechseln Sie zu root
Stellen Sie sicher, dass Ihr Bluetooth-Dongle erkannt wird. Wenn nicht, ziehen Sie den Dongle raus und stecken Sie es erneut.

lsusb

Machen Sie Ihr Bluetooth-Gerät erkennbar. Siehe Handbuch des Geräts.
Stellen Sie sicher, dass Ihr Gerät durch den Raspberry PI gesehen wird. 
Beachten Sie die MAC-Adresse (z. B.  DC:2C:26:DF:AF:58)

hcitool scan

Koppeln Sie das Gerät . Wenn gewünscht, geben Sie eine PIN wie 0000 und ENTER. 

bluez-simple-agent hci0  DC:2C:26:DF:AF:58

Stellen Sie das Gerät vertraut.

bluez-test-device trusted  DC:2C:26:DF:AF:58 yes

Schließen Sie das Gerät. Nach ein paar Sekunden wird Ihr Gerät verwendbar sein.

bluez-test-input connect  DC:2C:26:DF:AF:58

Wiederholen Sie die Schritte "Machen Sie Ihre Bluetooth-Gerät erkennbar", wenn Sie ein anderes Gerät installieren müssen.
Wenn Sie neu starten, werden die Geräte wieder automatisch nach ein paar Sekunden.

Raspberry Pi eine feste IP verpassen

OS Raspbian

Die Datei mit den Netzwerkeinstellungen in einen Editor laden:

sudo nano /etc/network/interfaces


Die interessierende Zeile ist diese hier:

auto eth0
iface eth0 inet dhcp

Den Erfordernissen entsprechend ändern, z.b. so:

auto eth0
iface eth0 inet static
    address 192.168.0.123 
    netmask 255.255.255.0
    gateway 192.168.0.1

Dann

sudo /etc/init.d/networking restart

oder

sudo reboot

FERTSCH ;)

09 August 2013

TeamPlatform von 3D-Systems übernommen

Nun ist es passiert, Teamplatform gehört nun zu 3D-Systems wie früher auch mal BfB.

https://www.teamplatform.com/3d-systems-acquires-teamplatform/

Hoffen wir mal das sie nicht wie BfB über nacht komplett verschwinden. Für mich kommt damit allerdings TeamPlatform nicht mehr in Frage. (siehe hier )

Die Kommentarfunktion ist dort zwar aktiviert, jedoch scheinen sie nicht erwünscht zu sein.
Abgegebene Kommentare verschwinden nach einigen Stunden...





Nachtrag:
Es kam wie es kommen musste. Der Laden wird dichtgemacht. War ja nicht anders von "3D Systems" zu erwarten.

Finger weg von dieser Firma.

Discontinuance of the TeamPlatform Product

Dear Customers & Partners,

On December 31, 2017, 3D Systems will be discontinuing the TeamPlatform collaboration and file sharing product. In recent months we have been seeing performance issues that would require a significant investment to address. Unfortunately, the small user base does not warrant further developing this proprietary solution when there are many commercial products on the market today with similar capabilities.

Customers with prepaid services will be engaged shortly by a 3D Systems representative to discuss a mutually agreeable path to transition.

Other customers with trial and monthly subscriptions will have 60 days from today’s date to migrate data to an alternative service or platform.

3D Systems team members are always here to assist, and can recommend alternative services as well as work out solutions should monthly subscribers need more time to transition. Those users who rely on TeamPlatform primarily for file sharing should be able to transition fairly easily to another service, but we understand that some users have developed workflows around TeamPlatform that may take longer to replace. Just get in touch with us at Support@Teamplatform.com if you have concerns or feel you require an exception to the December 31, 2017 termination date, and we will be happy to work with you.

Regards,
The 3D Systems Software Team

01 August 2013

Raspi cam

Raspberry Pi Kamera Support in Raspbian


die Kamera


Kameraport
Kurzbeschreibung
Das Raspberry Pi-Kamera-Modul ist ein 5-Megapixel-benutzerdefiniertes Add-on für Raspberry Pi , mit einem Fixfokus-Objektiv. Es ist in der Lage von 2592 x 1944 Pixel statische Bilder aufzunehmen und unterstützt auch 1080p30, 720p60 und 640x480p60/90 Video. Er kann an den Pi durch einen kleinen Steckplatz auf der Platinenoberseite angeschlossen werden und nutzt die speziellen CSi Schnittstelle für die Anbindung an Kamera.

5-Megapixel-native Auflösung Sensor-fähig 2592 x 1944 Pixel statische Bilder
Unterstützt 1080p30, 720p60 und 640x480p60/90 Video




Zuerst Raspbian auf den neuesten Stand bringen

sudo apt-get update

sudo apt-get upgrade

Danach in der Config die Kamera aktivieren

sudo raspi-config

Navigiere zum Menüpunkt “camera” und stelle auf “enable”.
Mit TAB auf “Finish” und Raspberry neu starten.


Kamerasoftware nutzen

raspivid ist eine Kommandozeilen-Anwendung, mit der Sie Videos mit dem Kamera-Modul zu erfassen, während die Application raspistill Bilder erfassen kann.

-o oder -output gibt den Ausgabe-Dateinamen und -t oder -timeout gibt die Länge der Zeit, für die Vorschau in Millisekunden. Standard für die Zeit ist 5s, -t 0 schaltet das Timeout ab.

raspistill erfasst das letzte Bild der Vorschau in diesem Zeitraum.

-d oder -demo startet den Demo-Modus und zeigt verschiedene verfügbare Effekte

Beispiele:

Aufnahme eines Bildes im JPEG Format (image.jpeg ist der Dateiname):

raspistill -o image.jpg
Aufnahme eines 5s Videos im h264 Format (video.h264 istr der Dateiname)

raspivid -o video.h264

Aufnahme eines 10s Videos im h264 Format

raspivid -o video.h264 -t 10000

Aufnahme eines 10s Videos im Demo-Mode:

raspivid -o video.h264 -t 10000 -d


Eine Liste der möglichen Optionen erhält man mit 

raspivid | less

raspistill | less

Benutze die Pfeiltasten und "q" zum beenden

erweiterte Dokumentation ist hier erhältlich (englisch).

Achtung: es ist empfehlenswert das SSH-Passwort zu ändern um unauthorisierten Zugriff zu verhindern.


Wie leiten wir einen Videostream der Raspberry Pi Kamera über Netzwerk

Ansicht unter Linux
Installieren der Software unf Abhängigkeiten mit folgendem Terminalkommando:

sudo apt-get install mplayer netcat

Finde deine IP Adresse mit ifconfig

Im Terminal folgenden Befehl ausführen um die Daten zu MPlayer zu leiten.

nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
Ansehen unter Windows

Download MPlayer.

Download Netcat.

Achtung: der Browser kann diese Dateien als gefährlich einstufen, da diese nicht digital signiert sind.

Drücke die Windows und die R taste zugleich um den Run-Dialog anzuzeigen. Tippe cmd und ENTER zum öffnen des DOS-Promts

Folgendes Kommando ausführen um den Strom in MPlayer anzuzeigen:

[Path to nc.exe]\nc.exe -L -p 5001 | [Path to mplayer.exe]\mplayer.exe -fps 31 -cache 1024 -
Ansehen unter OS X
Download MPlayer.
Alternatively, you can download mplayer using Brew, which we recommend.
Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).
Run the following command in Terminal to view the feed using MPlayer:
nc -l -p 5001 | mplayer -fps 31 -cache 1024 -


Ansehen mit  Raspberry Pi:
Bestimmen der IP-Adresse mit ifconfig
Ausführen der olgenden Kommandos auf dem empfangenden Pi
mkfifo buffer
nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer

Übertragen der Daten von dem Pi mit dem Kameramodul

Nach dem Setup der Empfangseinheit kommt das Setup der Sendeeinheit

raspivid -t 999999 -o – | nc [insert the IP address of the client] 5001
Anschließend können die Befehle aufgeführt werden aus dem Abschnitt über "Wie die Raspberry Pi-Kamera-Software verwenden", um die Aufnahme zu ändern oder eine Video-Effekt hinzufügen.




How to submit bug reports or see the source code
You can see the source code and submit bug reports for raspivid and raspicam here.
Raspi Cam Doc
RaspiCam Documentation
======================

This document describes the use of the three Raspberry Pi camera applications as of May 2013.

There are three applications provided, raspistill, raspivid and raspistillyuv. raspistill and raspistillyuv are very similar and are intended for capturing images, raspivid is for capturing video.

All the applications are command line driven, written to take advantage of the mmal API which runs over OpenMAX. The mmal API provides an easier to use system than that presented by OpenMAX. Note that mmal is a Broadcom specific API used only on Videocore 4 systems.

The applications use up to three OpenMAX(mmal) components - camera, preview and encoder. All applications use the camera component, raspistill uses the Image Encode component, raspivid uses the Video Encode component and raspistillyuv
does not use an encoder, and sends its YUV output direct from camera component to file.

The preview display is optional, but can be used full screen or directed to a specific rectangular area on the display.

In addition it is possible to omit the filename option, in which case the preview is displayed but no file is written, or to redirect all output to stdout.
     
Command line help is available by typing just the application name in on the command line.


Common Command line Options
===========================

Preview Window
==============

--preview, -p   Preview window settings <'x,y,w,h'>

Allows the user to define the size and location on the screen that the preview window will be placed. Note this will be superimposed over the top of any other windows/graphics.

--fullscreen, -f Fullscreen preview mode

Forces the preview window to use the whole screen. Note that the aspect ratio of the incoming image will be retained, so there may be bars on some edges.

--nopreview,   -n, Do not display a preview window

Disables the preview window completely. Note that even though the preview is disabled, the camera will still be producing frames, so will be using power.

Camera Control Options
======================

--sharpness, -sh Set image sharpness (-100 to 100)

Set the sharpness of the image, 0 is the default.

--contrast, -co Set image contrast (-100 to 100)

Set the contrast of the image, 0 is the default

--brightness, -br Set image brightness (0 to 100)
Set the brightness of the image, 50 is the default. 0 is black, 100 is white.

--saturation, -sa Set image saturation (-100 to 100)

set the colour saturation of the image. 0 is the default.

--ISO,       -ISO Set capture ISO

Not yet implemented

--vstab,     -vs   Turn on video stabilisation

In video mode only, turn on video stabilisation.

--ev,         -ev   Set EV compensation

Set the EV compensation of the image. Range is -10 to +10, default is 0.

--exposure,   -ex Set exposure mode 

Possible options are: 

off 
auto Use automatic exposure mode
night Select setting for night shooting
nightpreview
backlight Select setting for back lit subject
spotlight
sports Select setting for sports (fast shutter etc)
snow Select setting optimised for snowy scenery
beach Select setting optimised for beach
verylong Select setting for long exposures
fixedfps, Constrain fps to a fixed value
antishake Antishake mode
fireworks Select settings

Note that not all of these settings may be implemented, depending on camera tuning.

--awb, -awb Set Automatic White Balance (AWB) mode

off       Turn off white balance calculation
auto       Automatic mode (default)
sun         Sunny mode
cloud       Cloudy mode
shade       Shaded mode
tungsten Tungsten lighting mode
fluorescent Fluorescent lighting mode
incandescent   Incandescent lighting mode
flash   Flash mode
horizon Horizon mode

--imxfx,     -ifx Set image effect

Set an effect to be applied to the image

none NO effect (default)
negative Negate the image  
solarise Solarise the image
posterize Posterise the image
whiteboard Whiteboard effect
blackboard Blackboard effect
sketch Sketch style effect
denoise Denoise the image
emboss Emboss the image
oilpaint Apply an oil paint style effect
hatch Hatch sketch style
gpen
pastel A pastel style effect
watercolour A watercolour style effect
film Film grain style effect
blur Blur the image
saturation Colour saturate the image
colourswap Not fully implemented
washedout Not fully implemented
posterise   Not fully implemented
colourpoint Not fully implemented
colourbalance Not fully implemented
cartoon     Not fully implemented

--colfx,     -cfx Set colour effect <U:V>

The supplied U and V parameters (range 0 to 255) are applied to the U and Y channels of the image. For example, --colfx 128:128 should result in a monochrome image.

--metering,  -mm Set metering mode

Specify the metering mode used for the preview and capture

average Average the whole frame for metering.
spot Spot metering
backlit Assume a backlit image
matrix Matrix metering

--rotation,   -rot  Set image rotation (0-359)

Sets the rotation of the image in viewfinder and resulting image. This can take any value from 0 upwards, but due to hardware constraints only 0, 90, 180 and 270 degree rotations are supported.


--hflip,   -hf     Set horizontal flip

Flips the preview and saved image horizontally.

--vflip,   -vf     Set vertical flip

Flips the preview and saved image vertically.


Application specific settings
=============================

raspistill
==========

--width, -w Set image width <size>
--height, -h Set image height <size>
--quality,  -q Set jpeg quality <0 to 100>

Quality 100 is almost completely uncompressed. 75 is a good all round value

--raw, -r Add raw bayer data to jpeg metadata

This option inserts the raw Bayer data from the camera in to the JPEG metadata

--output -o Output filename <filename>.

Specify the output filename. If not specified, no file is saved. If the filename is '-', then all output is sent to stdout.

--verbose, -v Output verbose information during run

Outputs debugging/information messages during the program run.

--timeout, -t Time before takes picture and shuts down.

The program will run for this length of time, then take the capture (if output is specified). If not specified, this is set to 5 seconds

--timelapse,-tl Timelapse mode.

The specific value is the time between shots in milliseconds. Note you should specify %d at the point in the filename where you want a frame count number to appear. e.g.

-t 30000 -tl 2000 -o image%d.jpg

will produce a capture every 2 seconds, over a total period of 30s, named image1.jpg, image2.jpg..image15.jpg.


--thumb, -th Set thumbnail parameters (x:y:quality)

Allows specification of the thumbnail image inserted in to the JPEG file. If not specified, defaults are a size of 64x48 at quality 35.

--demo, d Run a demo mode <milliseconds>

This options cycles through range of camera options, no capture is done, the demo will end at the end of the timeout period, irrespective of whether all the options have been cycled. The time between cycles should be specified as a millisecond value.

--encoding, -e Encoding to use for output file

Valid options are jpg, bmp, gif and png. Note that unaccelerated image types (gif, png, bmp) will take much longer to save than JPG which is hardware accelerated. Also note that the filename suffix is completely ignored when encoding a file.

--exif, -x EXIF tag to apply to captures (format as 'key=value')

Allows the insertion of specific exif tags in to the JPEG image. You can have up to 32 exif tge entries. This is useful for things like adding GPS metadata. For example, to set the Longitude

--exif GPS.GPSLongitude=5/1,10/1,15/100

would set the Longitude to 5degs, 10 minutes, 15 seconds. See exif documentation for more details on the range of tags available; the supported tags are as follows.

IFD0.<   or 
IFD1.<
ImageWidth, ImageLength, BitsPerSample, Compression, PhotometricInterpretation, ImageDescription, Make, Model, StripOffsets, Orientation, SamplesPerPixel, RowsPerString, StripByteCounts, Xresolution, Yresolution, PlanarConfiguration, ResolutionUnit, TransferFunction, Software, DateTime, Artist, WhitePoint, PrimaryChromaticities, JPEGInterchangeFormat, JPEGInterchangeFormatLength, YcbCrCoefficients, YcbCrSubSampling, YcbCrPositioning, ReferenceBlackWhite, Copyright>

EXIF.<
ExposureTime, FNumber, ExposureProgram, SpectralSensitivity,          a
ISOSpeedRatings, OECF, ExifVersion, DateTimeOriginal, DateTimeDigitized, ComponentsConfiguration, CompressedBitsPerPixel, ShutterSpeedValue, ApertureValue, BrightnessValue, ExposureBiasValue, MaxApertureValue, SubjectDistance, MeteringMode, LightSource, Flash, FocalLength, SubjectArea, MakerNote, UserComment, SubSecTime, SubSecTimeOriginal, SubSecTimeDigitized, FlashpixVersion, ColorSpace, PixelXDimension, PixelYDimension, RelatedSoundFile, FlashEnergy, SpacialFrequencyResponse, FocalPlaneXResolution, FocalPlaneYResolution, FocalPlaneResolutionUnit, SubjectLocation, ExposureIndex, SensingMethod, FileSource, SceneType, CFAPattern, CustomRendered, ExposureMode,                 
WhiteBalance, DigitalZoomRatio, FocalLengthIn35mmFilm, SceneCaptureType, GainControl, Contrast, Saturation, Sharpness, DeviceSettingDescription, SubjectDistanceRange, ImageUniqueID>

GPS.<
GPSVersionID, GPSLatitudeRef, GPSLatitude, GPSLongitudeRef, GPSLongitude, GPSAltitudeRef, GPSAltitude, GPSTimeStamp, GPSSatellites, GPSStatus, GPSMeasureMode, GPSDOP, GPSSpeedRef, GPSSpeed, GPSTrackRef, GPSTrack, GPSImgDirectionRef, GPSImgDirection, GPSMapDatum, GPSDestLatitudeRef, GPSDestLatitude, GPSDestLongitudeRef, GPSDestLongitude, GPSDestBearingRef, GPSDestBearing, GPSDestDistanceRef, GPSDestDistance, GPSProcessingMethod, GPSAreaInformation, GPSDateStamp, GPSDifferential>

EINT.<
InteroperabilityIndex, InteroperabilityVersion, RelatedImageFileFormat, RelatedImageWidth, RelatedImageLength>

Note that a small subset of these tags will be set automatically by the camera system, but will be overridden by any exif options on the command line.


raspivid
========

--width, -w Set image width <size>

Width of resulting video. This should be between 64 and 1920.

--height, -h Set image height <size>

Height of resulting video. This should be between 64 and 1080.

--bitrate, -b Set bitrate. 

Use bits per second, so 10MBits/s would be -b 10000000. For H264, 1080p a high quality bitrate would be 15Mbits/s or more.

--output -o Output filename <filename>.

Specify the output filename. If not specified, no file is saved. If the filename is '-', then all output is sent to stdout.

--verbose, -v Output verbose information during run

Outputs debugging/information messages during the program run.

--timeout, -t Time before takes picture and shuts down.

The program will run for this length of time, then take the capture (if output is specified). If not specified, this is set to 5seconds

--demo, d Run a demo mode <milliseconds>

This options cycles through range of camera options, no capture is done, the demo will end at the end of the timeout period, irrespective of whether all the options have been cycled. The time between cycles should be specified as a millisecond value.

--framerate, -fps  Specify the frames per second to record

At present, the minimum frame rate allowed is 2fps, the maximum is 30fps. This is likely to change in the future.

--penc, -e Display preview image *after* encoding

Switch on an option to display the preview after compression. This will show any compression artefacts in the preview window. In normal operation, the preview will show the camera output prior to being compressed. This option is not guaranteed to work in future releases.



Examples
========

Still captures

By default, captures are done at the highest resolution supported by the sensor.  This can be changed using the -w and -h command line options.

Taking a default capture after 2s (note times are specified in milliseconds) on viewfinder, saving in image.jpg

raspistill -t 2000 -o image.jpg

Take a capture at a different resolution.

raspistill -t 2000 -o image.jpg -w 640 -h 480

Now reduce the quality considerably to reduce file size

raspistill -t 2000 -o image.jpg -q 5

Force the preview to appear at coordinate 100,100, with width 300 and height 200 pixels.

raspistill -t 2000 -o image.jpg -p 100,100,300,200

Disable preview entirely

raspistill -t 2000 -o image.jpg -n

Save the image as a png file (lossless compression, but slower than JPEG). Note that the filename suffix is ignored when choosing the image encoding. 

raspistill -t 2000 -o image.png –e png 

Add some EXIF information to the JPEG. This sets the Artist tag name to Boris, and the GPS altitude to 123.5m. Note that if setting GPS tags you should set as a minimum GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, GPSAltitude and GPSAltitudeRef.

raspistill -t 2000 -o image.jpg -x IFDO.Artist=Boris -x GPS.GPSAltitude=1235/10

Set an emboss style image effect

raspistill -t 2000 -o image.jpg -ifx emboss

Set the U and V channels of the YUV image to specific values (128:128 produces a greyscale image)

raspistill -t 2000 -o image.jpg -cfx 128:128

Run preview ONLY for 2s, no saved image.

raspistill -t 2000 

Take timelapse picture, one every 10 seconds for 10 minutes (10 minutes = 600000ms), named image_number_1_today.jpg, image_number_2_today.jpg onwards.

raspistill -t 600000 -tl 10000 -o image_num_%d_today.jpg

Take a picture and send image data to stdout

raspistill -t 2000 -o - 

Take a picture and send image data to file

raspistill -t 2000 -o - > my_file.jpg




Video Captures

Image size and preview settings are the same as for stills capture. Default size for video recording is 1080p (1920x1080)

Record a 5s clip with default settings (1080p30)

raspivid -t 5000 -o video.h264

Record a 5s clip at a specified bitrate (3.5MBits/s)

raspivid -t 5000 -o video.h264 -b 3500000

Record a 5s clip at a specified framerate (5fps)

raspivid -t 5000 -o video.h264 -f 5

Encode a 5s camera stream and send image data to stdout

raspivid -t 5000 -o - 

Encode a 5s camera stream and send image data to file

raspivid -t 5000 -o - > my_file.h264