Morning folks.
I found a perfect way of running raspistill preview and then taking a photos of that preview. I want to save all images taken on a USB drive so that when the flight is done i can take the SUB out the navio/pi and download the photos on to my pc, and this is the section I have problems with. Can any one give me a way of adding the USB drive to file path when the photo is taken
Hi
First of all you need to mount your usb drive.
Plug in the drive and run dmesg | tail
in terminal to get info about detected device.
[ 2491.434800] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[ 2491.435270] scsi host2: usb-storage 1-1.5:1.0
[ 2492.433368] scsi 2:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6
[ 2492.434708] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 2492.442216] sd 2:0:0:0: [sda] 30464000 512-byte logical blocks: (15.6 GB/14.5 GiB)
[ 2492.443520] sd 2:0:0:0: [sda] Write Protect is off
[ 2492.443547] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 2492.444259] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 2492.452196] sda: sda1
[ 2492.455059] sd 2:0:0:0: [sda] Attached SCSI removable disk
Here sda1
is a partition that need to be mounted. It’s located in /dev/sda1
.
Next create a directory under /media
, so you will be able to mount the drive:
sudo mkdir /media/myusb
Then mount sda1
with:
sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/myusb/
From now on you can save raspistill photos on the drive:
raspistill -o /media/myusb/photo.jpg
Before you detach your usb drive you need to unmount it:
sudo umount /media/myusb
3 Likes
How many beers do I owe you now ?
2 Likes
Tested it last night and everything works as you said :-).
1 Like
Akas_Roy
(Akas Roy)
August 18, 2017, 1:46pm
5
That’s great! I would like to try this as well.
system
(system)
Closed
November 26, 2017, 1:47pm
6
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.