Go to advanced search

by Ant232
Mon May 27, 2019 3:51 pm
Forum: General discussion
Topic: Can I Force Timesync(NTP) to use wifi
Replies: 6
Views: 871

Re: Can I Force Timesync(NTP) to use wifi

@ epoch1970
Thank you for the reply. This will take a little learning so it's 'kettle on time'. I appreciate you time very much.
by Ant232
Mon May 27, 2019 1:41 pm
Forum: General discussion
Topic: Can I Force Timesync(NTP) to use wifi
Replies: 6
Views: 871

Re: Can I Force Timesync(NTP) to use wifi

Thank you for the replies. Extraordinarily useful.. Sorry but there is another scenario that I should have included in my original post, that is that sometimes eth0 will have the NTP ref on it. @Andyroo Thank you for your reply. I have to find a way to priorities the interface that the Pi gets it NT...
by Ant232
Mon May 27, 2019 11:10 am
Forum: General discussion
Topic: Can I Force Timesync(NTP) to use wifi
Replies: 6
Views: 871

Can I Force Timesync(NTP) to use wifi

Hi all, I have a strange setup where the eth0 is connected to a network that has no internet access or NTP server. I also have a wifi adapter that connects to a network that does have access to an NTP server. Timesync (I'm using Stretch) seems to priorities eth0 when it looks for the NTP server (I a...
by Ant232
Tue May 23, 2017 11:49 am
Forum: General discussion
Topic: Disable onboard wifi and use dongle, any ideas?
Replies: 9
Views: 9767

Re: Disable onboard wifi and use dongle, any ideas?

Hi,

Thanks for the blacklist suggestion. I tried it but when I do ifconfig I can still see wlan0 and wlan1

I thought I had the problem solved with the DHCP settings in the above post but that crafty 169.254.. is still finding ways to annoy me :(

Thanks
A
by Ant232
Sat May 20, 2017 3:12 pm
Forum: General discussion
Topic: Disable onboard wifi and use dongle, any ideas?
Replies: 9
Views: 9767

Re: Disable onboard wifi and use dongle, any ideas?

In
/etc/dhcp/dhclient.conf
there are parameters for how long until the 169 address is assigned and how often the interface should retry to find a valid connection, these should sort the problem for me..

Thanks again for the previous replies.
A.
by Ant232
Sat May 20, 2017 2:33 pm
Forum: General discussion
Topic: Disable onboard wifi and use dongle, any ideas?
Replies: 9
Views: 9767

Re: Disable onboard wifi and use dongle, any ideas?

Thanks for the replies. I think I may have been looking at this the wrong way. What I am actually trying to do is stop the wlan1 interface from getting it's 169.254.. address when there is not wifi signal. It seems that once the 169.254... address is assigned the wlan1 does not pick up the router ev...
by Ant232
Sat May 20, 2017 9:05 am
Forum: General discussion
Topic: Disable onboard wifi and use dongle, any ideas?
Replies: 9
Views: 9767

Re: Disable onboard wifi and use dongle, any ideas?

Hi Dirk, Thanks for the reply. The dtoverlay=pi3-disable-wifi method has no effect. If I do ifconfig it shows wlan0 and wlan1. I might has to do an update/upgrade. I have been trying to avoid this because everything is stable on the pi at the mo and I was concerned that the update might break someth...
by Ant232
Sat May 20, 2017 8:43 am
Forum: General discussion
Topic: Disable onboard wifi and use dongle, any ideas?
Replies: 9
Views: 9767

Disable onboard wifi and use dongle, any ideas?

Hi all, As the subject states, is there any way to disable the onboard wifi and use a wifi dongle instead? I'm using the Pi in an area that has weak wifi and I have found that using a wifi dongle increases the range. The utility I have written is showing the IP address of the Pi on screen when it's ...
by Ant232
Tue Apr 25, 2017 5:21 pm
Forum: Python
Topic: locking pygame fps to local time
Replies: 1
Views: 366

locking pygame fps to local time

Hi all, I have a pygame script that shows an analog clock with a second hand. What I need to do is lock the fps (screen refresh) to the system time.I need to do this because if I just use the 'Clock.tick() method then every now and then the clock skips a second. I think it's it slowly drifts and has...
by Ant232
Thu Jan 26, 2017 9:12 pm
Forum: Python
Topic: Is PyGame introducing a latency to my clock?
Replies: 0
Views: 346

Is PyGame introducing a latency to my clock?

Hi, I have a pygame script that has a clock on it's display. This clock needs to be accurate to the second but seems to be out by 1 to 1.5 seconds (slower than speaking clock, online atomic clocks etc..). The NTP client has been updated and from what I can tell the system time is correct. Can python...
by Ant232
Sun Jan 15, 2017 10:34 am
Forum: General discussion
Topic: RF 433.92MHz wall socket
Replies: 1
Views: 724

Re: RF 433.92MHz wall socket

Hi, I did the same thing but using different model sockets. I used: http://www.ebay.ie/itm/5PCS-433Mhz-RF-transmitter-and-receiver-kit-Module-Arduino-ARM-WL-MCU-Raspberry-/191740837423?hash=item2ca4a4fe2f:g:B-QAAOSweuxWTE9U to communicate with the sockets. I can't remember the reason why but I used ...
by Ant232
Wed Apr 13, 2016 11:22 pm
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Re: Python/Flask app not working correctly when run with Bas

That seems a much better way to go. No more worrying about paths :-)

Thanks for the advice..
by Ant232
Wed Apr 13, 2016 10:12 pm
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Re: Python/Flask app not working correctly when run with Bas

BINGO!! Happy that it's sorted and quite embarrassed that I didn't spot it.. In my python app I didn't have the full path to the variables file to be opened. Because I always ran the app from the directory with the variables file in it, it always worked. Then.. I noticed that there was another varia...
by Ant232
Wed Apr 13, 2016 9:50 pm
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Re: Python/Flask app not working correctly when run with Bas

Yes, that's what I do..

And does it work from the home directory? Ohhhhhhh no it doesn't... Thank you for spotting that :-)

Do I have to give read write permissions to all the directories?

Thanks again..
by Ant232
Wed Apr 13, 2016 9:25 pm
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Re: Python/Flask app not working correctly when run with Bas

OK.. Can't get my head around this Python app runs fine when run from terminal (logged in as pi) It doesn't run properly when I start it with systemd, rc.local or cron. I put a 20 second delay in cron but no luck.. Also tried sudo crontab and just plain old crontab ps -ef result when run from cronta...
by Ant232
Wed Apr 13, 2016 4:27 pm
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Re: Python/Flask app not working correctly when run with Bas

Thanks for the reply DrikS.. I tried what you suggested and it did start the app straight from the service file. Don't know why the Bash was used in the tutorial I found?? Thanks for that, no more Bash, but... The original problem is still there.. I have done the 'systemctl daemon-reload' after each...
by Ant232
Wed Apr 13, 2016 10:42 am
Forum: Python
Topic: Python/Flask app not working correctly when run with Bash
Replies: 10
Views: 3726

Python/Flask app not working correctly when run with Bash

Hi all, I have a Python app that runs a Flask server. What happens is: - Browse to the Flask page - The page retrieves variables from a text file and shows them in text boxes and colour pickers etc.. - The user can then modify these variables and write the modified ones back to the text file This wo...
by Ant232
Sat Apr 02, 2016 7:54 am
Forum: Python
Topic: Pygame variables set from web interface
Replies: 6
Views: 1157

Re: Pygame variables set from web interface

Thanks again mysen and scotty101 for the advice. I went down the Flask route and it has been a fantastic solution so far. CGI may have been equally as good but I had to pick one.. I thought I was going to have people putting in individual RGB colors for each item on the display (which will be a lot)...
by Ant232
Thu Mar 31, 2016 2:30 pm
Forum: Python
Topic: Pygame variables set from web interface
Replies: 6
Views: 1157

Re: Pygame variables set from web interface

Thank you both for the replies. I will have a look at both option now..
It is great to know I will be going down a path that works..
by Ant232
Thu Mar 31, 2016 12:36 pm
Forum: Python
Topic: Pygame variables set from web interface
Replies: 6
Views: 1157

Re: Pygame variables set from web interface

Also, all the variable for the Pygame script are stored in a separate file that is just for variables..
by Ant232
Thu Mar 31, 2016 12:34 pm
Forum: Python
Topic: Pygame variables set from web interface
Replies: 6
Views: 1157

Pygame variables set from web interface

Hi, I'm following up on a related question I asked yesterday https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=142457 Thank you for all the replies.. I think I need a bit of guidance with the overall structure of what I am trying to do.. I have a Pygame display that has elements (rects, text, ...
by Ant232
Wed Mar 30, 2016 5:54 pm
Forum: Python
Topic: Can a variable be changed while a loop is running?
Replies: 7
Views: 1028

Re: Can a variable be changed while a loop is running?

Thank you very much for all the replies.
I will read the file as described by Paddy..

Another thing learned today :-)

Thanks again..
by Ant232
Wed Mar 30, 2016 5:05 pm
Forum: Python
Topic: Can a variable be changed while a loop is running?
Replies: 7
Views: 1028

Can a variable be changed while a loop is running?

Hi, I have a script running import time while True: from var import * print NAME time.sleep(1) Which reads from a file "var" containing NAME = "PONY" This prints out PONY every second which is expected. If I SSH in to the Pi with the script running and change the variable, should the print out not c...
by Ant232
Fri Mar 11, 2016 8:24 pm
Forum: Python
Topic: I'm getting a increasing latency using Python's UDP socket
Replies: 2
Views: 1904

Re: I'm getting a increasing latency using Python's UDP sock

Hi Mattmiller,

Thank you very much for your reply. You were spot on!!!

Thank you again,

Ant
by Ant232
Thu Mar 10, 2016 11:22 pm
Forum: Python
Topic: I'm getting a increasing latency using Python's UDP socket
Replies: 2
Views: 1904

I'm getting a increasing latency using Python's UDP socket

Hi all, I have 2 Pis. A 'send Pi' and a 'receive Pi' connected over wired LAN. On the send Pi I have a simple script that reads a GPIO state and sends a UDP packet based on the the state. On the receive Pi I have a script that receives the packet, writes the packet to a text file and prints the resu...

Go to advanced search