3korre.se

by ekorrar for ekorrar!

User Tools

Site Tools


raspberry_lcd_nexa

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
raspberry_lcd_nexa [2015/01/16 11:48]
ekorre
raspberry_lcd_nexa [2015/01/16 11:53]
ekorre
Line 275: Line 275:
   
  
 +</file>
 +
 +**Kamera scriptet**
 +Det den gör är ta en bild med "raspistill" (alla variablar kan läsa i scriptet) och lägger bilden på en nätverks utdelning. Vill man så kan man ändra det till usbdisk, mapp etc. Sök efter xx och byt ut.
 +
 +<file python selfi.sh>
 +#!/bin/bash
 +
 +PICTURE=$(date +"%Y-%m-%d_%H%M").jpg
 +SOURCE=/tmp
 +DESTINATION=/mnt
 +
 +GETCOUNT=$(ps aux | grep raspistill | grep -v grep | wc -l)
 +
 +if [ "$GETCOUNT" -eq 0 ]
 +then
 + echo inga raspistill processer kors.. fortsatter...
 + raspistill -vf -hf -w 640 -h 480 -q 75 -o $SOURCE/$PICTURE
 + mount -t cifs -o "username=xx,password=xx" //xxdisk/xxshare $DESTINATION
 + cp $SOURCE/$PICTURE $DESTINATION/$PICTURE
 + rm $SOURCE/$PICTURE
 + sync;sync
 + umount /mnt
 + echo allt verkar i sin ordning...
 +else
 + echo RASPISTILL ALREADY RUNNING!
 +fi
 </file> </file>
raspberry_lcd_nexa.txt · Last modified: 2015/01/16 12:04 by ekorre