Go to advanced search

by sbaratheon
Sun Jan 14, 2018 3:57 pm
Forum: General programming discussion
Topic: Is there anything wrong with this bash script (timelapse)?
Replies: 6
Views: 1141

Re: Is there anything wrong with this bash script (timelapse)?

I was under the impression that $SECONDS was an internal variable (http://tldp.org/LDP/abs/html/internalvariables.html) It is. But you might want to set it to zero at the start. I thought the variable recorded the number of seconds elapsed since the script started running (i.e. it's set at 0 when t...
by sbaratheon
Sun Jan 14, 2018 3:56 pm
Forum: General programming discussion
Topic: Is there anything wrong with this bash script (timelapse)?
Replies: 6
Views: 1141

Re: Is there anything wrong with this bash script (timelapse)?

OK. I'm not sure why your loop terminates and you're dumping any stderr messages into /dev/null by running it from /etc/rc.local. Did you know that raspistill has a built-in timelapse option? Use that and your only remaining problem is killing it when 720 minutes are over. -tl, --timelapse : Timela...
by sbaratheon
Sun Jan 14, 2018 2:47 pm
Forum: General programming discussion
Topic: Is there anything wrong with this bash script (timelapse)?
Replies: 6
Views: 1141

Re: Is there anything wrong with this bash script (timelapse)?

DougieLawson wrote:
Sun Jan 14, 2018 2:32 pm
Where does the $SECONDS variable get set? Where does that variable get updated?
I was under the impression that $SECONDS was an internal variable (http://tldp.org/LDP/abs/html/internalvariables.html)
by sbaratheon
Sun Jan 14, 2018 2:25 pm
Forum: General programming discussion
Topic: Is there anything wrong with this bash script (timelapse)?
Replies: 6
Views: 1141

Is there anything wrong with this bash script (timelapse)?

I've written the following bash script to use the rpi's camera as a timelapse (i didn't use raspistill directly as you can't save the timestamp): # Note: This script runs at startup (listed in /etc/rc.local) #!/bin/bash MINUTES=720 SECONDS_TO_RUN=$((60 * MINUTES)) DELAY=25 while [ "$SECONDS" -lt "$S...
by sbaratheon
Sat Jan 06, 2018 10:55 pm
Forum: For sale
Topic: Free raspberry pi camera (v1)
Replies: 4
Views: 5330

Free raspberry pi camera (v1)

Hi

I no longer need my rpi camera (i just bought v2).

I'm therefore giving my old one away to a good home. I'll put it in the post to you (UK only).

The first person who posts here confirming they'd like it will get it. PM me your address.

Thanks
by sbaratheon
Tue Jan 02, 2018 1:30 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Anyone with experiences of the FT4232h
Replies: 2
Views: 1226

Anyone with experiences of the FT4232h

Hi I'm looking to expand the number of Serial interfaces available on my Pi. After some research, it seems that the following is one option which has been discussed on this (and other ) forums: http://www.ftdichip.com/Products/ICs/FT4232H.htm I believe you can connect this to your Pi with a USB cabl...
by sbaratheon
Fri Dec 29, 2017 2:30 pm
Forum: Camera board
Topic: Problems taking photos on boot
Replies: 6
Views: 820

Re: Problems taking photos on boot

Post the code you're running. Ah, I've realised my mistake. The script referred to raspistill -o [directory] but the fully directory was not specified. I think rc.local needs the full script name (which was provided) but also the contents of that script needs to refer to the full directory. Thanks ...
by sbaratheon
Fri Dec 29, 2017 12:17 am
Forum: Camera board
Topic: Problems taking photos on boot
Replies: 6
Views: 820

Re: Problems taking photos on boot

It runs as root. So shouldn't be writing to /home/pi unless you are using a setuid and/or setgid calls to change back from root to pi. Try starting it from a sudo nano /etc/systemd/system/something.service file [Unit] Description=run pi service at boot [Service] ExecStart=/home/pi/python/something....
by sbaratheon
Thu Dec 28, 2017 11:23 pm
Forum: Camera board
Topic: Problems taking photos on boot
Replies: 6
Views: 820

Re: Problems taking photos on boot

DougieLawson wrote:
Thu Dec 28, 2017 11:18 pm
Where are you directing the output? /etc/rc.local runs with a limited environment and may not have the current working directory you expect.
rc.local runs a script in /home/pi/ which in turn outputs images to /home/pi/timelapse/

Do you think that might be the issue?
by sbaratheon
Thu Dec 28, 2017 9:48 pm
Forum: Camera board
Topic: Problems taking photos on boot
Replies: 6
Views: 820

Problems taking photos on boot

Hi I'm trying to take photos automatically on boot of my Pi. I've created a shell script which is essentially a timelapse (I didn't use the native version as it doesn't allow you to record the timestamp of the photo). I've tested running this script and it works fine. To get the script to run on boo...
by sbaratheon
Wed Dec 27, 2017 9:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Problems with a RTC
Replies: 2
Views: 478

Re: Problems with a RTC

DougieLawson wrote:
Wed Dec 27, 2017 6:44 pm
Those instructions are nearly three years out of date.

You simply need to add

Code: Select all

dtoverlay=i2c-rtc,ds3231
to /boot/config.txt to get the hardware driver enabled.
Thanks, I removed the old changes and just changed as per your instructions. Works perfectly now.
by sbaratheon
Wed Dec 27, 2017 5:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Problems with a RTC
Replies: 2
Views: 478

Problems with a RTC

Hi all I've been trying to install a DS3231 on my Pi A+. The model is the DS3231 and I've been following these instructions https://www.raspberrypi-spy.co.uk/2015/05/adding-a-ds3231-real-time-clock-to-the-raspberry-pi/ I follow the instructions and all seems to go to plan. The i2cdetect program show...
by sbaratheon
Sat Jul 25, 2015 7:31 pm
Forum: Camera board
Topic: raspistill timelapse not working
Replies: 3
Views: 729

Re: raspistill timelapse not working

Ah, the files seem to be getting the same file name and thus writing over the file each time

why are the file names the same as each should be different given that it varies by time ?
by sbaratheon
Sat Jul 25, 2015 6:25 pm
Forum: Camera board
Topic: raspistill timelapse not working
Replies: 3
Views: 729

Re: raspistill timelapse not working

any ideas?
by sbaratheon
Thu Jul 23, 2015 10:48 pm
Forum: Camera board
Topic: raspistill timelapse not working
Replies: 3
Views: 729

raspistill timelapse not working

I'm using the following command:

Code: Select all

raspistill -o HABPIC_$(date "+%H_%M_%S").jpg -t 600000 -tl 60000
to take one picture every minutes for 10 minutes.

The program runs for 10 minutes but I only get one picture.

No error messages.

Any ideas?

Thanks
by sbaratheon
Thu Dec 26, 2013 12:43 am
Forum: Camera board
Topic: streaming pi camera works only sometimes
Replies: 1
Views: 1215

streaming pi camera works only sometimes

I'm trying to stream video over LAN using my pi camera board with: raspivid -o - -t 99999 -hf -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264 which seems to work the first time (client using VLC) but then fails a second time: raspivid ...
by sbaratheon
Mon Dec 23, 2013 9:42 pm
Forum: Troubleshooting
Topic: sd card doesn't fit
Replies: 4
Views: 1208

Re: sd card doesn't fit

Ah.

Turns out there was a tiny piece of plastic (old sd card?) stuck in the slot.

Apologies to Tesco!
by sbaratheon
Mon Dec 23, 2013 7:13 pm
Forum: Troubleshooting
Topic: sd card doesn't fit
Replies: 4
Views: 1208

Re: sd card doesn't fit

Tescos (I know, I know...).
by sbaratheon
Mon Dec 23, 2013 7:04 pm
Forum: Troubleshooting
Topic: sd card doesn't fit
Replies: 4
Views: 1208

sd card doesn't fit

I've had a rpi for quite a while but I lost my SD card.

So I went and bought a new SD Card (SDHC 8GB CLASS 4 TDK). But the card doesn't insert the full length into the rpi (without force).

Do I force it in? Is my rpi broken?
by sbaratheon
Fri Sep 20, 2013 7:19 pm
Forum: HATs and other add-ons
Topic: GSM SIM900
Replies: 1
Views: 899

GSM SIM900

Has anyone bought one of these for the rpi? Does it work?
by sbaratheon
Sat Jun 15, 2013 11:44 pm
Forum: Beginners
Topic: Strange autoreconf error
Replies: 1
Views: 554

Re: Strange autoreconf error

lol deleted that file and it worked!

so it says that a file doesn't exist and deleting the file makes it exist again...
by sbaratheon
Sat Jun 15, 2013 11:29 pm
Forum: Beginners
Topic: Strange autoreconf error
Replies: 1
Views: 554

Strange autoreconf error

I've download a repo from github which built fine on ubuntu (PC) using:

Code: Select all

autoreconf -fi
./configure
make
but autoreconf -fi is saying that a particular file 'm4/lt~obsolete.m4' does not exist. Yet I can see it very clearly using my shell.

Can someone tell me what is going on?
by sbaratheon
Wed Jun 12, 2013 12:29 am
Forum: C/C++
Topic: Building twitcurl
Replies: 2
Views: 1499

Re: Building twitcurl

Ah cheers. Added defined(__arm__) and it compiled. Absolutely no idea what I'm doing!
by sbaratheon
Tue Jun 11, 2013 8:34 pm
Forum: C/C++
Topic: Building twitcurl
Replies: 2
Views: 1499

Building twitcurl

I'm trying to build twitcurl. I downloaded the source code using 'svn checkout' and then ran 'sudo make' (as stated here http://code.google.com/p/twitcurl/wiki/WikiHowToUseTwitcurlLibrary) but I get this: g++ -Wall -fPIC -c -I/usr/include twitcurl.cpp oauthlib.cpp urlencode.cpp base64.cpp HMAC_SHA1....
by sbaratheon
Wed May 15, 2013 12:09 am
Forum: Beginners
Topic: SSH only working after startx
Replies: 1
Views: 656

Re: SSH only working after startx

Or maybe not. Wifi is giving me grief.

Post hoc ergo propter hoc.

Go to advanced search