Go to advanced search

by Tyrael_Archangel
Wed Aug 09, 2017 5:00 pm
Forum: Python
Topic: Self restart Python script
Replies: 17
Views: 35595

Re: Self restart Python script

you may also need to add

Code: Select all

#!/usr/bin/python
to the very top of your script (first line), I can't remember if this is required or not for it to work but it can't hurt
by Tyrael_Archangel
Wed Aug 09, 2017 2:15 pm
Forum: Python
Topic: Self restart Python script
Replies: 17
Views: 35595

Re: Self restart Python script

you can use something like this to restart a python script from within itself

Code: Select all

os.execv('/AbsolutePathtoScript/a.py', lst_args)  
I use this within a script that handles upgrading the rest of my code to restart itself if it needs to upgrade itself.
by Tyrael_Archangel
Tue Mar 28, 2017 11:04 pm
Forum: Python
Topic: Zero (success) with Adafruits 16 led neopixel ring [solved]
Replies: 7
Views: 3733

Re: Zero (success) with Adafruits 16 led neopixel ring

The level shifting is likely your problem then. While the magpi article does not use level shifting, Adafruit recommends it as 3.3v logic may not always be enough. to quote Adafruit: Note that you might be able to get your NeoPixels to work without any level conversion, but it's not really guarantee...
by Tyrael_Archangel
Tue Mar 28, 2017 8:51 pm
Forum: Python
Topic: Zero (success) with Adafruits 16 led neopixel ring [solved]
Replies: 7
Views: 3733

Re: Zero (success) with Adafruits 16 led neopixel ring

I can think of 2 things to check: 1. Are you level shifting the Pi's signaling output to 5V? the Neopixels require 5V signalling so if you are not level shifting up the voltage there is a good chance your not hitting strong enough signal for the ws281x drivers to detect or only sometimes detect. 2. ...
by Tyrael_Archangel
Mon Mar 27, 2017 3:32 pm
Forum: General discussion
Topic: Does anybody had bad experiences with CanaKit.com?
Replies: 7
Views: 3507

Re: Does anybodey else has bad experiences with CanaKit.com

Sorry to hear that your having problems with them. I have had nothing but good experiences with them and have order around a dozen or so Pi from them over the past 2 years (both through amazon and their website) for both personal and business use. That said I have never needed to contact them so I c...
by Tyrael_Archangel
Thu Mar 09, 2017 4:43 pm
Forum: Python
Topic: Displaying an Image over HDMI
Replies: 2
Views: 709

Displaying an Image over HDMI

Hi All, a while back I created an application on a Pi that performs some optical measurement tests on various devices that we manufacture. I have been asked to extend the range of measurements that it performs. As part of these new measurements I will need to be able to use the HDMI port on the Pi t...
by Tyrael_Archangel
Tue Mar 07, 2017 8:58 pm
Forum: Raspbian
Topic: Static IP address templates for dhcpcd.conf
Replies: 32
Views: 98499

Re: Static IP address templates for dhcpcd.conf

On one of my Pi's I'm running Jessie 2017-01-11. Setting a fxed ip is extensively documented and I can confirm it works. However, I'm struggling to also set fixed values for the domain name and the search list. I got the domain name inserted by adding it to /etc/resolvconf.conf: domain = mydomain.l...
by Tyrael_Archangel
Mon Jan 16, 2017 8:06 pm
Forum: Python
Topic: Prgram stop to work
Replies: 6
Views: 1379

Re: Prgram stop to work

axl.axel wrote:
I run the python code with the following line added to rc.local:
> sudo python logging.py &
you need to drop the sudo (rc.local will be run from root) and add the full path to your python script

something like:

python /home/pi/logging.py &
by Tyrael_Archangel
Mon Jan 16, 2017 6:59 pm
Forum: Python
Topic: How to call class method from different modul
Replies: 4
Views: 1838

Re: How to call class method from different modul

Ok, working Code this time (Had to change calls from PyQt4 to PySide since thats what I have) gui.py (the auto generated stuff) # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'GUI_test.ui' # # Created: Mon Jan 16 16:47:13 2017 # by: PyQt4 UI code generator 4.11.2 # # WA...
by Tyrael_Archangel
Mon Jan 16, 2017 6:47 pm
Forum: Python
Topic: How to call class method from different modul
Replies: 4
Views: 1838

Re: How to call class method from different modul

Generally with PySide or PyQt, you should leave the auto generated code alone and then from another module import the generated class and subclass it. In that subclass is where you would connect signals and slots and add custom methods something like this: (Note: I dont have PyQt installed so this c...
by Tyrael_Archangel
Sat Nov 12, 2016 6:16 am
Forum: Advanced users
Topic: Qt5 GUI supported on Pi?
Replies: 9
Views: 5657

Re: Qt5 GUI supported on Pi?

Can you post how to do this? sure its pretty easy. 1. open /etc/apt/sources.list 2. change the line: deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi to deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi 3. do an apt-get update 4. apt...
by Tyrael_Archangel
Thu Nov 10, 2016 3:37 pm
Forum: Advanced users
Topic: Qt5 GUI supported on Pi?
Replies: 9
Views: 5657

Re: Qt5 GUI supported on Pi?

Thanks guys, I'll check those pages. In the mean time I found this wiki page. Not the most up-to-date, but at least at a place where I guess we can depend on this actually having some value. Did anyone try this tutorial? https://wiki.qt.io/RaspberryPi2EGLFS I tried an older version of this tutorial...
by Tyrael_Archangel
Mon Jun 13, 2016 3:42 pm
Forum: Camera board
Topic: Get Camera Hardware Revision
Replies: 6
Views: 2457

Re: Get Camera Hardware Revision

Did you solve it? If so, can you please post how? I'm trying to find out which camera hardware is connected through python and querying the camera's resolution. if I connect camera v2.1 and in python print(camera.MAX_RESOLUTION) python responds with the wrong values of camera v1.x (2592, 1944) Pica...
by Tyrael_Archangel
Mon May 02, 2016 8:52 pm
Forum: General discussion
Topic: Powering a pi cluster
Replies: 8
Views: 2649

Re: Powering a pi cluster

I use one of these to power multiple pi's at once: http://www.amazon.com/Anker-6-Port-Charger-PowerPort-Samsung/dp/B00P936188/ref=sr_1_6?s=lawn-garden&ie=UTF8&qid=1462221712&sr=8-6&keywords=anker+powerport Although its technically for charging multiple phones, it works well and can supply up to 2.4 ...
by Tyrael_Archangel
Thu Mar 24, 2016 6:55 pm
Forum: Raspbian
Topic: Static IP address templates for dhcpcd.conf
Replies: 32
Views: 98499

Re: Static IP address templates for dhcpcd.conf

So have I have done some experimenting with your suggestions and I cant get this to work the way I would like. If I put the static lines right after the arping lines, that address is always assigned even if the arping is found. if I put the static lines after the arping profiles, dhcpcd crashes (I a...
by Tyrael_Archangel
Thu Mar 24, 2016 3:16 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi 3 B Act LED Control
Replies: 2
Views: 2220

Pi 3 B Act LED Control

Does anyone know if it is possible to control the Act LED on a Pi 3 through the GPIO? I know that this was possible on the Pi 2, but with the LED moved to the GPIO expander can this still be done and how?
by Tyrael_Archangel
Thu Mar 24, 2016 2:59 am
Forum: Raspbian
Topic: Static IP address templates for dhcpcd.conf
Replies: 32
Views: 98499

Re: Static IP address templates for dhcpcd.conf

Thanks for the advice on this rurwin, when I get a chance I'll play around with this and let you know how it goes. Would you happen to know if there is a command I could run after modifying the conf file to force dhcpcd to reload and re-configure the interface based on the new conf file?
by Tyrael_Archangel
Wed Mar 23, 2016 9:28 pm
Forum: Raspbian
Topic: Static IP address templates for dhcpcd.conf
Replies: 32
Views: 98499

Re: Static IP address templates for dhcpcd.conf

Is there a way to dhcpcd.conf so that it tries all the arping profiles and if none are found it just sets a specified static address instead of attempting to get a DHCP address? (kinda like the fallback profile, but not needing DHCP to fail before it sets it)
by Tyrael_Archangel
Tue Mar 15, 2016 4:01 pm
Forum: General discussion
Topic: Raspberry Pi 3 boot filter
Replies: 4
Views: 1133

Re: Raspberry Pi 3 boot filter

after a bit of a struggle getting my code to work as I wanted it to, it appears that the [pi3] filter seems to work and I am able to switch the same image between a Pi 2 and a Pi 3 without issue with the overlay being correctly applied to the Pi 3 and not the Pi 2
by Tyrael_Archangel
Mon Mar 14, 2016 1:22 pm
Forum: General discussion
Topic: Raspberry Pi 3 boot filter
Replies: 4
Views: 1133

Raspberry Pi 3 boot filter

Does anyone know if the boot config.txt supports a [pi3] filter like it does for the [pi1] and [pi2]?
I am looking at adding support for the Pi 3 to my code, but I will need to apply a dt overlay only if the Pi is a Pi 3.

Thanks
by Tyrael_Archangel
Mon Mar 14, 2016 6:53 am
Forum: Python
Topic: Several python scripts running, if 1 crash, all crash
Replies: 4
Views: 968

Re: Several python scripts running, if 1 crash, all crash

Without any code I can only make guesses, but I would think that scripts A and B have some sort of interdependence on each other, either directly (direct communication between the 2) or indirectly (like sharing a file or common resource) and that interdependence is the source of your crash. We launc...
by Tyrael_Archangel
Fri Mar 04, 2016 2:26 am
Forum: General discussion
Topic: The Raspberry Pi 3 Model B Q&A thread
Replies: 457
Views: 222838

Re: The Raspberry Pi 3 Model B Q&A thread

I have 2 questions about the pi 3 currently.

1. does the boot/config.txt support a [pi3] for pi 3 specific configs like it does for the original pi and pi 2?

2. is there a way to control the pi 3 ACT LED from a GPIO like we could with the pi 2?
by Tyrael_Archangel
Mon Feb 29, 2016 10:58 pm
Forum: General discussion
Topic: The Raspberry Pi 3 Model B Q&A thread
Replies: 457
Views: 222838

Re: The Raspberry Pi 3 Model B Q&A thread

... So it doesn't share the usb bus with the 4 ports and Ethernet? Also i am guessing the uart pins on the gpio header are untouched and can be used normally. WiFi / BT are both connected via bank 1 GPIOs. The UART on the GPIO header is now the mini-uart - a slight downside is that variations in co...

Go to advanced search