Go to advanced search

by symeboy
Tue Apr 11, 2017 10:34 pm
Forum: Beginners
Topic: Crash out of loop with sudo halt = bad?
Replies: 2
Views: 352

Re: Crash out of loop with sudo halt = bad?

Excellent, thankyou :mrgreen:
by symeboy
Tue Apr 11, 2017 8:56 pm
Forum: Beginners
Topic: Crash out of loop with sudo halt = bad?
Replies: 2
Views: 352

Crash out of loop with sudo halt = bad?

Hi all, I need to exit a loop and shut down on a button press, the python script below works, in that it forces a sudo shutdown directly. Is this OK or do I need to find a way to exit the loop first? Ive tried sys.exit() and various attempts using kill -SIGSTOP but neither work. Might not be a probl...
by symeboy
Sat Apr 08, 2017 2:33 pm
Forum: Beginners
Topic: STOP python script running on startup
Replies: 7
Views: 3952

Re: STOP python script running on startup

Thanks for the input, Afraid I still couldnt find the solution in any of those directories. I am using Raspbian yes.. I have changed the name of the script which now just throws up an error at boot because the file cant be found, but I would like to find where the script is starting from since i wou...
by symeboy
Fri Apr 07, 2017 8:08 pm
Forum: Beginners
Topic: STOP python script running on startup
Replies: 7
Views: 3952

Re: STOP python script running on startup

Thanks,

No joy with files inside /etc/xdg/autostart

and running the lines below opens new files

sudo nano ~/.config/autostart
sudo nano ~/.config/lxsession/LXDE/autostart
sudo nano ~/.config/lxsession/LXDE-pi/autostart
by symeboy
Fri Apr 07, 2017 7:29 pm
Forum: Beginners
Topic: STOP python script running on startup
Replies: 7
Views: 3952

STOP python script running on startup

A long time ago I managed to get a python script to start on boot, now I want to disable this, but I cannot remember how I did it!
Ive tried looking in:
sudo nano /etc/rc.local
sudo nano ~/.bashrc
sudo crontab -e

No dice, anywhere else you think I could try?
Sorry for the stupid question, thanks
by symeboy
Thu Apr 06, 2017 6:42 pm
Forum: Beginners
Topic: using sox in python script
Replies: 3
Views: 1266

Re: using sox in python script

Bingo! thanks :-)

import os
os.system("AUDIODRIVER=alsa AUDIODEV=hw:0,0 rec recordtest.wav")
by symeboy
Thu Apr 06, 2017 6:25 pm
Forum: Beginners
Topic: using sox in python script
Replies: 3
Views: 1266

using sox in python script

Hi, Ive got sox working through the command terminal export AUDIODEV=hw:0,0 rec rectest.wav how does this work as a python script? I have tried import os os.system("export AUDIODEV=hw:0,0") os.system("rec rectest.wav") ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave Segmentation fa...
by symeboy
Tue Mar 10, 2015 11:09 pm
Forum: Troubleshooting
Topic: ALSA sample rate
Replies: 1
Views: 1624

ALSA sample rate

Hi, Ive got ALSA running with a USB microphone, recording seems to work OK. Problem is that the microphone can handle up to a sample rate of 250Khz and ALSA wont let me go above 192Khz... pi@raspberrypi ~ $ sudo arecord -d 10 -D plughw:1,0 -r 192 -c 1 /boot/testwavs/test.wav Recording WAVE '/boot/te...

Go to advanced search