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
Previous revision
Next revision Both sides next revision
raspberry_lcd_nexa [2015/01/16 11:41]
ekorre [Filerna]
raspberry_lcd_nexa [2015/01/16 11:53]
ekorre
Line 72: Line 72:
 **Huvudscripet** **Huvudscripet**
  
-<file lcdnexameny.py>+Sök efter xx och byt ut värderna där. 
 +Om jag inte missat nåt så är det 2 ställen: 
 +  * Tempgivarna 
 +  * Sökvägen till camera scriptet 
 + 
 +<file python lcdnexameny.py>
 #!/usr/bin/python #!/usr/bin/python
  
Line 270: 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