Go to advanced search

by hilts50
Sat Jun 29, 2019 2:39 am
Forum: Troubleshooting
Topic: systemd service causing stop job hangup dhcpcd on all interfaces on shutdown
Replies: 1
Views: 921

Re: systemd service causing stop job hangup dhcpcd on all interfaces on shutdown

After fighting with this for a while, I just started over with a wipe of the SD card a fresh install of the lasts release and it is working fine with the following code. [Unit] Description=Turns off LED's on shutdown. After=network.target [Service] Type=simple RemainAfterExit=true ExecStart=/bin/tru...
by hilts50
Thu Jun 27, 2019 12:55 am
Forum: Troubleshooting
Topic: systemd service causing stop job hangup dhcpcd on all interfaces on shutdown
Replies: 1
Views: 921

systemd service causing stop job hangup dhcpcd on all interfaces on shutdown

I am working on a project with neopixels and currently trying to get the LED's to shut off when the pi is shutdown/rebooted. Im working on a systemd service file that will call a shell script to run a python script during the shutdown/reboot sequence. It works for the most part, but on some of the r...
by hilts50
Tue Apr 10, 2018 3:56 pm
Forum: Python
Topic: Raspberry Pi Light Detector
Replies: 35
Views: 9892

Re: Raspberry Pi Light Detector

A quick stylistic comment, all caps with underscores is usually reserved for constants, since you're changing the value of LED_BRIGHTNESS it is not a constant so should be lower case. Ref. https://www.python.org/dev/peps/pep-0008/#naming-conventions Of course as with everything in programming this ...
by hilts50
Tue Apr 10, 2018 1:31 am
Forum: Python
Topic: Raspberry Pi Light Detector
Replies: 35
Views: 9892

Re: Raspberry Pi Light Detector

Incase someone else is looking at this wondering the same thing . This is what I ended up needing to code. It is very simple, but I really had not frame of reference so I had a difficult time even knowing what to google.

Code: Select all

if GPIO.input(4) == 1:
    LED_BRIGHTNESS = 75
else:
    LED_BRIGHTNESS = 255
by hilts50
Fri Apr 06, 2018 7:39 pm
Forum: Python
Topic: Raspberry Pi Light Detector
Replies: 35
Views: 9892

Re: Raspberry Pi Light Detector

Thanks bensimmo!! Been digging around on this for a couple days. Appreciate the help.
by hilts50
Fri Apr 06, 2018 7:28 pm
Forum: Python
Topic: Raspberry Pi Light Detector
Replies: 35
Views: 9892

Re: Raspberry Pi Light Detector

You cannot. That 'For loop' is just there to loop 5 times, nothing else. Your sensor only has two values On and Off (or True/False ). It is effectively a switch. EDIT I have just not the sensor has an Analogue output, the Pi cannot interface with that directly and would probably need an ADC. So thi...
by hilts50
Fri Apr 06, 2018 4:46 pm
Forum: Python
Topic: Raspberry Pi Light Detector
Replies: 35
Views: 9892

Re: Raspberry Pi Light Detector

Im trying to use the digital Light found at Sensor http://www.uugear.com/portfolio/using-light-sensor-module-with-raspberry-pi/ I want it to print code into a python script Im working on. If I use the code provided below.... import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(4,GPIO.IN) for i ...
by hilts50
Sat Mar 31, 2018 1:27 pm
Forum: Beginners
Topic: Sunwait not working..
Replies: 26
Views: 3688

Re: Sunwait not working..

At the risk of suggesting a solution that doesn't fit your use case.... Rather than using Sunwait, why not add a light sensor? Build LED dimming into your main script, and set the brightness according to the ambient light? It doesn't have to be a binary choice, and it will cope with sunny vs cloudy...
by hilts50
Sat Mar 31, 2018 1:19 pm
Forum: Beginners
Topic: Sunwait not working..
Replies: 26
Views: 3688

Re: Sunwait not working..

KLL wrote:
Sat Mar 31, 2018 3:19 am
hilts50 wrote:
Sat Mar 31, 2018 3:04 am
@reboot /NeoSedctional/startup.sh
*/15 * * * * /NeoSectional/startup.sh
is that the full path? at root?
or should it be /home/pi/NeoSectional/startup.sh
It is the full path at root. Thanks for noticing the typo!
by hilts50
Sat Mar 31, 2018 3:04 am
Forum: Beginners
Topic: Sunwait not working..
Replies: 26
Views: 3688

Re: Sunwait not working..

So I am working on this live sectional project where I have a python script that pulls the current METAR (aviation weather) for a specified list of Airports and then it parses that information and assigns an RGB color to an LED for that airport. These LED's are embedded in an aviation map so each ai...

Go to advanced search