-
1Ramdisk for raspberry pi
So, you want to take a bunch of photos, but don't want to burn the SD card on the raspberry pi? Place the files on a ramdisk.
Make the ramdisk
sudo mkdir /mnt/ramdisk
Edit the rc.local file
sudo nano /etc/rc.local
Add the lines above exit 0
mount -o size=30M -t tmpfs none /mnt/ramdisk
/bin/chown pi:root /mnt/ramdisk
/bin/chmod 777 /mnt/ramdisk
Reboot, then check the file structure with
df -h
Now, when you use raspistill, direct the output to the ramdisk
i.e.,
raspistill -n -t 2 -o /mnt/ramdisk/test.jpg
-
2How to take a bunch of fast timelapse pictures
Let's say you want to use the raspberry pi to take a bunch of fast timelapse pictures (i.e., 1 second between pictures).
First, you kick off the raspistill (this command will work with SSH too!)
nohup raspistill -n -t 0 -o /mnt/ramdisk/test.jpg > /dev/null 2>&1 &
Then, find out the PID with:
pgrep raspistill
Then, whenever you want a new picture to be taken, you use the "kill" command to send the message to raspistill to take a picture:
kill -USR1 12125
where 12125 is the PID you found using pgrep
Then, you can rename the pictures or network copy them. I think raspistill also takes in an incrementing filename.
Don't forget to kill the raspistill process when you are done! For example,
kill 12125
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.